OpenTTD/OpenTTD

[Bug]: GSText broken by 14.0 (Invalid parameter)

Closed this issue · 2 comments

Version of OpenTTD

14.0

Expected result

When using the Bee Reward game script in Version 14, the news report that shows up at the start of the game is correctly formatted, just like it used to be.
I know game script related issues don't normally belong here, but since an OpenTTD change broke it I imagine this could apply to other scripts.

Actual result

When using the Bee Reward game script in Version 14, the news report that shows up at the start of the game contains a reference to "(invalid parameter)". Normally I'd expect this to be an issue with the game script itself, but this works fine in 13.4, and previous versions of OpenTTD. If there's a way to fix this in the game script code itself, any guidance there would be greatly appreciated. I'm not sure what 14 does differently in the GSText parameters.

Steps to reproduce

Start a new game using only the BeeReward Game Script. (No NewGRFs required)
Ensure the game does not start paused
Observe the end of the "New goal" reward message. In Version 13 it will be correctly formatted, in Version 14 it contains an "invalid parameter" message.
(Tested on Windows 10 using the Steam version)

In version 14 we improved validations of the strings, and many Game Scripts are not using GSText properly.
Being correctly formatted in version 13 was just pure luck.
You can check script debug window to see all the warnings.

Fair enough. Thanks for the quick response. I'll close this out