I`m making a game that needs to update 2 variables at once, so I used labels during testing to be used as a displayer for the 2 variables I need to update. But when I used it, only 1 update, I don't know what's the issue/bug. The label that didn't update is mntCost. This is my code and all of the referenced functions
Try setting your two labels at the end (inside) of the EFF_saveAllValues procedure?
All of them update, but the mntCost label updates only once
See the difference?
That's why it is a good idea to init global constant variables for those tag texts, adding _TAG to the variable name, and using the global variables instead of the text blocks.
init global mntCost_TAG 'mntCost'
call TinyDB GetValue(global mntCost_TAG,...)
This also helps with typeblocking.
3 Likes
thanks for the solution, highlight, and an advice to improve my code style!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.




