• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • 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

H

Han_emmm

Guest
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.
 
H

Han_emmm

Guest
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