D
Darren
Guest
I'm getting this FATAL ERROR in action number 1 of Step Event0 for object oControl:
Variable <unknown_object>.y(1, -2147483648) not set before reading it.
at gml_Script_scr_state_ai_turn (line 28) - scr_navigation(x,y,round(nearest_move.x/32)*32, round(nearest_move.y/32)*32,pace);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_scr_state_ai_turn (line 28)
called from - gml_Object_oControl_Step_0 (line 5) - case states.ai_turn: scr_state_ai_turn(); break;
I don't understand why, I set it right before
this is the code
nearest_target = instance_nearest(x,y,pPlayer);
nearest_move = instance_nearest(nearest_target.x,nearest_target.y,oMovesquareai);
nearest_attack = instance_nearest(x,y,oAttacksquareai);
if (type == 1)
{
if (moved == false)
{
sprite_index = run_anim;
scr_navigation(x,y,round(nearest_move.x/32)*32, round(nearest_move.y/32)*32,pace);
}
Can anybody help please? My game wont run anymore, I ran until minutes ago using this exact same code.
Variable <unknown_object>.y(1, -2147483648) not set before reading it.
at gml_Script_scr_state_ai_turn (line 28) - scr_navigation(x,y,round(nearest_move.x/32)*32, round(nearest_move.y/32)*32,pace);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_scr_state_ai_turn (line 28)
called from - gml_Object_oControl_Step_0 (line 5) - case states.ai_turn: scr_state_ai_turn(); break;
I don't understand why, I set it right before
this is the code
nearest_target = instance_nearest(x,y,pPlayer);
nearest_move = instance_nearest(nearest_target.x,nearest_target.y,oMovesquareai);
nearest_attack = instance_nearest(x,y,oAttacksquareai);
if (type == 1)
{
if (moved == false)
{
sprite_index = run_anim;
scr_navigation(x,y,round(nearest_move.x/32)*32, round(nearest_move.y/32)*32,pace);
}
Can anybody help please? My game wont run anymore, I ran until minutes ago using this exact same code.