Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSNews.Create makes game script failed on Linux, 1.5.0 #6276

Closed
DorpsGek opened this issue Apr 6, 2015 · 3 comments
Closed

GSNews.Create makes game script failed on Linux, 1.5.0 #6276

DorpsGek opened this issue Apr 6, 2015 · 3 comments
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) question Further information is requested

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Apr 6, 2015

Gavin opened the ticket and wrote:

Env:

Ubuntu 12.04, OpenTTD 1.5.0, Simple_City_Builder-2015.01.07

It seems Windows version works fine.

Description:

On 1.5.0, GSNews.Create has two more params:
NewsReferenceType
ref_type

http://nogo.openttd.org/api/1.5.0/classGSNews.html# 97c8abe72c217c2b34795c5b6b37fe0a

And a GSNews.Create call of old version will crash the script:

dbg: [script] [18] [S] Your script made an error: wrong number of parameters
dbg: [script] [18] [S]
dbg: [script] [18] [S] *FUNCTION [HQClaimTown()] content_download/game/Simple_City_Builder-2015.01.07/main.nut line [358]
dbg: [script] [18] [S] *FUNCTION [DailyLoop()] content_download/game/Simple_City_Builder-2015.01.07/main.nut line [245]
dbg: [script] [18] [S] *FUNCTION [Process()] content_download/game/Simple_City_Builder-2015.01.07/main.nut line [174]
dbg: [script] [18] [S] *FUNCTION [Start()] content_download/game/Simple_City_Builder-2015.01.07/main.nut line [153]

Reported version: 1.5.0
Operating system: Linux


This issue was imported from FlySpray: https://bugs.openttd.org/task/6276
@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 7, 2015

Alberth wrote:

Made a trivial test game script that displays a news message (and then crashes as its Start function then terminates).
This works for me in trunk, with 1.4 compatibility, just like your script.

I would expect this as well, as the script lives completely in the Squirrel domain, and Windows and Unix are the same there (modulo used compilers).
If you run the debug level at 6 ( ./openttd -d script=6 ), do you get the "dbg: [script] [18] [I] 1.4 API compatibility in effect." line ?

The file that fixes 1.4 -> 1.5 compatibility of news is (copied the line from the 1.5 source download):

-rw-r--r-- root/root 644 2015-04-01 20:35 openttd-1.5.0/bin/game/compat_1.5.nut

Do you have this file?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6276#comment13857

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 7, 2015

Alberth wrote:

Oops, that file is actually

-rw-r--r-- root/root 899 2015-04-01 20:35 openttd-1.5.0/bin/game/compat_1.4.nut


This comment was imported from FlySpray: https://bugs.openttd.org/task/6276#comment13858

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Goal/Game script labels Apr 7, 2018
@TrueBrain TrueBrain added the question Further information is requested label Apr 10, 2018
@TrueBrain
Copy link
Member

No response after 3 years. Closing ticket.

@frosch123 frosch123 added the component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) label Apr 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants