Question:
Do I Need to Use a Single Equal Sign or a Double Equal Sign when Coding in Game Maker?


Answer:

Most programming languages use a single equal sign ( = ) and double equal signs (==) when declaring and comparing variables. Each one has specific rules for each use. Game Maker does too!

When comparing variables in if statements, you can use either single or double equal signs. (See image above)



When declaring or changing variables, use a single equal sign. (See image above)



If you use a double, you'll get an error! (See image above)

Page updated: March 23rd, 2015 @ 6:21 AM Eastern Time

Copyright 2010-2023 ExecuteCode.com.
All Rights Reserved.
Our other websites: