I am encountering this error with game maker and I do not know how to fix it. The error is
#
FATAL ERROR in action number 1 of Step Event0 for object obj_meatball:
DoAdd :2: undefined value at gml_Script_enemy_wander (line 4) - phy_position_x += sign(targetx - x)
############################################################################################
stack frame is gml_Script_enemy_wander (line 4) called from - gml_Object_obj_meatball_StepNormalEvent_1 (line 3) - script_execute(state);
My Code is stated below:
///enemy wander script_execute(checkplayer)
phy_position_x += sign(targetx - x) phy_position_y += sign(targety - y)
Any help will be much appreciated
Thankyou