• 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.

Discussion Undefined variable shows up in list as if it were already declared

matharoo

manualman
GameMaker Dev.

Don't know if this is supposed to happen, but I find it weird that a variable that hasn't been declared before shows up in the variable list just while typing it. Shouldn't there be some sort of differentiation between a variable that has been declared and something you're just typing?
 

The-any-Key

Member
You wrote moving in the if statement before. So now it exists in autocomplete.

Try write myvariable on a line. Note you dont get any autocomplete. Then go to the next line and start write myvariable. Now it shows up in the list.
 

matharoo

manualman
GameMaker Dev.
You wrote moving in the if statement before. So now it exists in autocomplete.

Try write myvariable on a line. Note you dont get any autocomplete. Then go to the next line and start write myvariable. Now it shows up in the list.
I get that, but does it really have to show "movi" in the variable list?
 

gnysek

Member
If you wait too long, or start to delete text using backspace, variable will be added. It will get removed on changing line. It's because code gets parsed against variables as you wrote, instead of having some sleep margin, or only after line change (by arrrows/mouse/enter).
 
Top