Any reason why game skips this code?

error.png

the 101 variable is defined as this,

◆Control Variables:#0101 \i[308] Population: =($gameVariables.value(103)+$gameVariables.value(61))+5

This highlighted part execution occurs for all people except two. Upon , closer investigation I found out for those two people the highlighted part is getting totally skipped. In fact "switch 15" is getting "switched on" automatically instead of being off. There is no other event having this switch in the map and this event is the first event occurring on the map.

Any reason it's skipping the highlighted portion and "switch 15" is getting "switched on"?
Thanks .

P.S: Game Engine is rpgmaker MV 1.6.1
the computer never skips any code, but I can think of several other options what happens.

1) have you completely configured all your plugins?
a lot of plugins use switches and variables to allow the developer to control them, and to report their solutions.
And 99% of all new users think they can ignore the plugin configuration that they don't understand, which often results in a plugin gaining control of switches and variables that they use elsewhere.

Whenever you add a plugin, you have to configure it completely. Part of that is checking if any switch or variable used by the plugin is indeed still free to use. If it is already used, you configure the plugin to use a different variable - and in both cases you'll name the variable used in the editor to prevent yourself from using it later for something else.

As for the variable problem: The only way it would be skipped is by having a typo or so in the script.
I strongly suggest you replace that command with two control variable commands using regular options without script and then test again.
also, I suggest adding a show text before the control switch command that shows the content of all variables used - at the moment you cannot determine if the calculation doesn't happen at that time, if the calculation has different numbers than you imagine or if the calculation is correct but the variable is overwritten at a later moment by a different command or plugin.
the computer never skips any code, but I can think of several other options what happens.

1) have you completely configured all your plugins?
a lot of plugins use switches and variables to allow the developer to control them, and to report their solutions.
And 99% of all new users think they can ignore the plugin configuration that they don't understand, which often results in a plugin gaining control of switches and variables that they use elsewhere.

Whenever you add a plugin, you have to configure it completely. Part of that is checking if any switch or variable used by the plugin is indeed still free to use. If it is already used, you configure the plugin to use a different variable - and in both cases you'll name the variable used in the editor to prevent yourself from using it later for something else.

As for the variable problem: The only way it would be skipped is by having a typo or so in the script.
I strongly suggest you replace that command with two control variable commands using regular options without script and then test again.
also, I suggest adding a show text before the control switch command that shows the content of all variables used - at the moment you cannot determine if the calculation doesn't happen at that time, if the calculation has different numbers than you imagine or if the calculation is correct but the variable is overwritten at a later moment by a different command or plugin.
Thank you, for detailed explanation but what puzzles me if the highlighted code was not running properly everyone would have same issue but that's not the case, out of say 100 only 2 people are having this skipping issue.
but what puzzles me if the highlighted code was not running properly everyone would have same issue but that's not the case, out of say 100 only 2 people are having this skipping issue.
that is basically proof that the problem is elsewhere - and why I said you need to add the show text between that command to proof that the variables are set correctly at that moment but changed by something else later (which is still my best guess)

Original thread: https://forums.rpgmakerweb.com/threads/any-reason-why-game-skips-this-code.137888/