05-23-2020, 10:52 PM
(05-19-2020, 01:59 PM)goh Wrote: Well, I started over and suddenly happens to be that when I got the cape feather and error shows up:That's not how you use instance_exists, you did not properly write your conditions.
Can anyone fix this, please?Code:############################################################################################ FATAL ERROR in action number 1 of Draw Event for object obj_capeanimation: Unable to find any instance for object index '416' name 'obj_flyingmario' at gml_Object_obj_capeanimation_DrawEvent_1 (line 2) - and instance_exists(obj_flyingmario.sprite_index = spr_mario_big_runjump or not instance_exists(obj_flyingmario)) ############################################################################################ -------------------------------------------------------------------------------------------- stack frame is gml_Object_obj_capeanimation_DrawEvent_1 (line 2)
The object was being called before checking if the object exists.
Replace from this
if (instance_exists(obj_flyingmario.sprite_index = spr_mario_big_runjump or not instance_exists(obj_flyingmario))
to this
if (instance_exists(obj_flyingmario)) and (obj_flyingmario.sprite_index == spr_mario_big_runjump)
It checks if the object exists before any other condition ensues.