• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE Space rocks tutorial

Han_emmm

Member
Hi there,

just tried out GameMaker today for the first time. I have been following the tutorial for space rocks.

I have been getting this error:

___________________________________________
############################################################################################
ERROR in
action number 1
of Key Press Event for <Space> Key
for object obj_ship:

Creating instance for non-existing object: -4
at gml_Object_obj_ship_KeyPress_32 (line 8) - var newBullet = instance_create_layer(x + 0, y + 0, "Instances", noone);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_ship_KeyPress_32 (line 8)

does anyone know what this issue is? I'm sure I have followed everything exactly as shown in tutorial but when running the game this comes up when I press space to shoot.

Tia,
Hannah :)
 
instance_create_layer(x + 0, y + 0, "Instances", noone);
You need to use the object type that you want to create an instance of, not noone. What your line of code is trying to do is create an instance of an object that has an id of -4 (which is what noone translates into). You have to specify an object to create.
 

Han_emmm

Member
You need to use the object type that you want to create an instance of, not noone. What your line of code is trying to do is create an instance of an object that has an id of -4 (which is what noone translates into). You have to specify an object to create.
Thank you!
 
Top