Game Development Reference
In-Depth Information
You will probably notice the lines of hashtags; these are more or less just borders or line
breaks. Feel free to ignore them.
The first four lines are important; they show exactly where and in which object the error
took place. As you can see, the error states that in action number 1 and Step Event0 , the
error took place. It also states that the error took place in object obj_Player . This accur-
ately shows us exactly where the error actually took place. So, based on this, we will go to
our obj_Player object and then go to action number 1 in the step event.
From this point, we can start checking the code for issues, but instead of aimlessly search-
ing through code, there is more information we can gather from the error message.
In the next set of lines, there is a bunch of seemingly random information at first glance.
In the first line, we can see Push :: Execution Error - Variable Get -1.max_spd . This
line alone states exactly what is going wrong. Variable Get essentially means that the
variable the program was trying to access does not exist or the program simply can't find
it in memory. The error also states the actual variable it was searching for by entering
1.max_spd . This means the max_spd variable can't be found.
We now know exactly what variable had the issue. Once again, though, we don't know
where in the code there was an issue and also what the program was trying to do at that
time. However, this information can also be found in the error produced.
In the final line, we can see gml_Object_obj_Player_StepNormalEvent_1 . This essen-
tially states that the error took place in obj_Player in the normal step event. The line
then continues with (line 5) - x+=mac_spd . This means the error took place in line five of
the code block and that the code GameMaker was trying to execute is x+=max_spd .
Search WWH ::




Custom Search