Designing Games with Game Maker - YoYo Games
Designing Games with Game Maker - YoYo Games
Designing Games with Game Maker - YoYo Games
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Here are some variables and functions that deal <strong>with</strong> errors.<br />
error_occurred Indicates whether an error has occurred<br />
error_last String indicating the last error message<br />
show_debug_message(str) Shows the string in debug mode<br />
The following functions exist that allow you to check whether certain variables exist and <strong>with</strong><br />
which you can set variables and get their values. In all these functions the variable name is<br />
passed as a string!<br />
variable_global_exists(name) Returns whether a global variable <strong>with</strong><br />
the given name (a string) exists.<br />
variable_local_exists(name) Returns whether a local variable <strong>with</strong> the<br />
given name (a string) exists for the current instance.<br />
variable_global_get(name) Returns the value of the global variable <strong>with</strong><br />
the given name (a string).<br />
variable_global_array_get(name,ind) Returns the value of index ind<br />
of the global array variable <strong>with</strong> the given name (a string).<br />
variable_global_array2_get(name,ind1,ind2) Returns the value of<br />
index ind1,ind2 of the global 2-dimensional array variable <strong>with</strong> the given name<br />
(a string).<br />
variable_local_get(name) Returns the value of the local variable <strong>with</strong> the<br />
given name (a string).<br />
variable_local_array_get(name,ind) Returns the value of index ind of<br />
the local array variable <strong>with</strong> the given name (a string).<br />
variable_local_array2_get(name,ind1,ind2) Returns the value of<br />
index ind1,ind2 of the local 2-dimensional array variable <strong>with</strong> the given name<br />
(a string).<br />
variable_global_set(name,value) Sets the global variable <strong>with</strong> the<br />
given name (a string) to the given value.<br />
variable_global_array_set(name,ind,value) Sets the index ind in<br />
the global array variable <strong>with</strong> the given name (a string) to the given value.<br />
variable_global_array2_set(name,ind1,ind2,value) Sets the index<br />
ind1,ind2 in the global 2-dimensional array variable <strong>with</strong> the given name (a<br />
string) to the given value.<br />
variable_local_set(name,value) Sets the local variable <strong>with</strong> the given<br />
name (a string) to the given value.