Variables not working

I have searched, I am new to RPG maker and I have spent far too long trying to figure out what is wrong, so sorry if its a really simple problem.

I am trying to set up a day counter. I dont care about changing days automatically, it happens when a player interacts with a bed, but thats beside the point.

So I have an event that auto runs that should create and set the Day to 1 but when the game starts its always 0.

I created an event to increment the day, but even then nothing happens.

I added a switch to the auto run event in the hope that would make a difference and it didnt.

Any advice? I am sure its a simple fix!

EDIT: I found the issue, in my game_variables script, @data[variable_id] = value was set to @data[variable_id] = 0.

This can be closed now thanks

Capture.PNG
Any chance you've added scripts and any of them use the same variables?


Do you have extra tabs on that event (always good to show screenshots of the WHOLE event window rather than cropping it, so we can see stuff like that at a glance). What's on the other pages?


If you have multiple pages on an event, the engine will start at the HIGHEST numbered page and works its way back until it finds one without any conditions or where all the conditions are met. So if you happen to have another tab there with a higher number and it has no conditions, IT will be the active one. To be sure, add a Show Text command in there as well. If your text doesn't get displayed you know the event isn't even running (or at least that page of the event isn't).

Original thread: https://forums.rpgmakerweb.com/threads/variables-not-working.42729/