GMS 2 Object Does Not Exist Error (It Does)

Hi,
I'm receiving the following error. I have the object in a create event within brackets. The object exists. I first used a draw sprite line in a Draw event but it said the sprite did not exist so I tried an instance_create_depth? I'm not sure what to do now.

ERROR in action number 1 of Create Event for object obj_blue_cooper_select:
Creating instance for non-existing object: 576 at gml_Object_obj_blue_cooper_select_Create_0 (line 3) - instance_create_depth(obj_star_bench,-100,224,576)
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_blue_cooper_select_Create_0 (line 3)

Matt
 

jo-thijs

Member
Hi,
I'm receiving the following error. I have the object in a create event within brackets. The object exists. I first used a draw sprite line in a Draw event but it said the sprite did not exist so I tried an instance_create_depth? I'm not sure what to do now.

ERROR in action number 1 of Create Event for object obj_blue_cooper_select:
Creating instance for non-existing object: 576 at gml_Object_obj_blue_cooper_select_Create_0 (line 3) - instance_create_depth(obj_star_bench,-100,224,576)
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_blue_cooper_select_Create_0 (line 3)

Matt
You've got the order of the arguments wrong, it is:
Code:
instance_create_depth(x, y, depth, object)
 
Top