Z
zendraw
Guest
why does this code
give me this error?
this happens when i try to room_goto_next(); otherwise during gameplay there is no problem. what is happening that i am missing? also this started happening when i put all the code in scripts and then just run the scripts in the controller object as seen in the error message. is this a GMS bug or? how do i fix it?
Code:
if (place_meeting(x, y, par_alien))
{
with (par_alien)
{
if (place_meeting(x, y, other))
{
var abz=abs(z-other.z);
if (abz<other.targ_range)
{
other.targ_range=abz;
other.target=id;
}
}
}
}
Code:
ERROR!!! :: ############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object o_ctrl:
Variable <unknown_object>.<unknown variable>(100091, -2147483648) not set before reading it.
at gml_Script_scr_damage_fighter (line 17) - if (abz<other.targ_range) ############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_scr_damage_fighter (line 17)
called from - gml_Object_o_ctrl_StepNormalEvent_1 (line 250) - with (o_dmg) {scr_damage_fighter()};
Compile finished: 16:49:28