Could somebody help interpret this error message?

I'm having trouble interpreting this message

############################################################################################
FATAL ERROR in
action number 1
of Step EventJungleSpecialtyBrain
for object SpitObject3:

Variable <unknown_object>.y_coord(100939, -2147483648) not set before reading it.
at gml_Object_SpitObject3_Collision_dd963632_b8e8_4d06_a0bd_70c01fc9692d (line 32) - floater = instance_create_depth(x_coord+10, y_coord-10, -1700, DamageIndicatorObject);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_SpitObject3_Collision_dd963632_b8e8_4d06_a0bd_70c01fc9692d (line 32)
Should I post the code for it?
 
All the information to get you started is in the message. Let's break it down:
GML:
FATAL ERROR in
action number 1
of Step EventJungleSpecialtyBrain
for object SpitObject3:
You should be looking at the Step Event of an object called SpitObject3. Potentially an object called JungleSpecialtyBrain if such exists. If both exist then this is likely to be in a place where both objects interact with one another.

Code:
stack frame is
gml_Object_SpitObject3_Collision_dd963632_b8e8_4d06_a0bd_70c01fc9692d (line 32)
Specifically around line 32 (the IDE tells you the line numbers on the left). But if you notice the line here mentions Collision, so the code is probably in the Collision Event, not the Step event, although my guess is the Collision event was triggered by the Step event.

Code:
Variable <unknown_object>.y_coord(100939, -2147483648) not set before reading it.
This is GameMaker's way of saying that the variable y_coord is not defined at this point in time. The most often cause is a typo in the variable name, so I'd double check that. It might not be in this particular line though, you might have misspelled it when you declared the variable. It could also be that you just didn't declare the variable at all, in which case you're trying to use something that you never created so you should either double check that indeed y_coord is what you want or that the code you added to set its initial value is executed (I suggest always initializing variables in the objects' create events or when they are declared, if they are local variables). Since we might be dealing with a Collision event you should be careful, as you need to make sure you're referring to the y_coord of the correct object, so maybe you meant other.y_coord?

Hope this helps.
 
Last edited:
Top