• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM 'Variable not set' error, but it's not a variable at all.

L

lonedarkness

Guest
I'm getting this error.


___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object Ob_TestPlayerSlopes:

Variable Ob_TestPlayerSlopes.yes(100036, -2147483648) not set before reading it.
at gml_Object_Ob_TestPlayerSlopes_StepNormalEvent_1 (line 122) - if (collision_rectangle(x+8, y+1, sign(move)*(x+(sprite_width/2)+abs(hsp)), y+5, par_slope, yes, yes))
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_Ob_TestPlayerSlopes_StepNormalEvent_1 (line 122)

Normally, 'variable not set' is easy enough to take care of, but as you can see, the 'variable' is not a variable - it's an argument of the collision_rectangle function, and one that needs to be present or else my project won't compile.
Anyone know why this is happening?
 
You need replace the yes with a value of either true or false. Literally you need to write true to activate the given parameter, or false to disable it. The manual for the collision_rectangle() function has further usage examples. yes is not a keyword in the game maker language, so its just treated as another variable, an undefined one in this case.
 
Top