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

Mac OSX Variable name "collision_shape" cannot be used!!

xDGameStudios

GameMaker Staff
GameMaker Dev.
when we try to declare a variable:

GML:
collision_shape = noone;
GMS2 game will not run and throws a compiler error:

Creation Code in Room: room0 at line 3 : cannot use function/script name for a variable, using "collision_shape"
 

xDGameStudios

GameMaker Staff
GameMaker Dev.
It is exactly as it says, they variable is being reserved/used by the engine. Just use a new variable name and you will be fine :)
I know that!! šŸ˜“
My problem is NOT about "not knowing" what's happening is about KNOWING what's happening :)
The problem is that it is a bug! The variable is not marked as reserved in the IDE... and not stated as reserved in the documentation.

what if people use it like this:
variable_instance_set(id, "collision_shape", noone);

this would probably throw an error.. and if not it could raise bugs further in development.
The question here is simple..

1) It is a leftover from previous implementations!
SOLUTION) Then the compiler should allow it :)

2) It's really being used by the engine!
SOLUTION) Document it so it doesn't bring problems down the line ;)
 
Top