Variable Bug

Greetings,

We have a variable called funds, which is in charge of counting player’s money. The method that we use to display that variable to the player is by using a text object. Everything works fine until you set the initial value to be more than 1000000. We are trying to solve this issue on our own but any help that you can bring will be appreciated.



I think global variables can’t be created through variable window. only scene variables can be created.
If you want to store variable in global then to display it store global variable to scene variable and scene variable will be use in text object

In my case there is no error please provide more information if error remains
error1.PNG

There’s no bug with global variables : it works whenever the variable is > 100000000 or <.
Just be sure to define the variable in the global variable window (Right click on the project name > Variables to access the global variables window).

Hello developers,

Hopefully we have managed to sort things out and the issue was resolved. Apparently this issue was related to the actions/conditions order. For future reference, if someone encounters with the same situation, make sure that the variable conditions are always placed at the end, and that the variable actions at the beginning respectively.

Special thanks to Ousaf & Victor for the help.

Happy developing! :slight_smile:

I don’t think you can deduce a general rule from your solution : the variables may have been affected by other conditions and actions in the event.