The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Yona-TYT on October 28, 2022, 07:07:10 PM

Title: [Script Tool] Global variables always return to their starting value
Post by: Yona-TYT on October 28, 2022, 07:07:10 PM
If I define a global variable "count <- 0" then run the tool and perform an increment "count++", when I release the click the variable will return to zero.

Try here: test_tool_err.zip

Edit.
I confirm that with the one-click tools there are no problems.
Title: Re: [Script Tool] Global variables always return to their starting value
Post by: Yona-TYT on October 29, 2022, 03:37:55 AM
The solution was more than obvious..... heheheheh :P  0001-Fix-uninitialized-info-restart.patch

Title: Re: [Script Tool] Global variables always return to their starting value
Post by: Dwachs on October 29, 2022, 04:16:24 PM
Thanks for spotting & fixing ! in r10791.