Drag And Drop Beginner Stuff- Spawning Error?

Baconleaf

Member
I've been following the DnD tutorial for asteroids. Everything works besides an odd issue when The ship collides with a rock. If I set to 1 life, the gameover screen runs fine, but if I set to 3 the game runs fine until I theoretically should have 2 lives. I went on with the tutorials until the final beginner one- adding sound, etc. Tried looking at the gml code preview box to get to line 149 to get a better insight, but I'm it only goes down to 49 (some 2 digit number give or take). Tried checking on line 17 too, but I'm just confused.

I'm wondering if it's a typing error on my part (I accidentally type "hright" instead of "height" at one point) or a node dropped in the wrong area. I'm still getting used to the interface and what the log (below) could mean. As far as I understand- obj_game has an issue in the event of "Room Start" that has to do with a variable not being created for the asteroids spawning. Don't really understand beyond that.

This is a copy/paste from the log after it crashes.

___________________________________________
############################################################################################
ERROR in
action number 1
of Other Event: Room Start
for object obj_game:

local variable event_create(100017) not set before reading it.
at gml_Object_obj_game_Other_4 (line 149) - instance_create_layer(xx, yy, "Instances", obj_assteroid);
############################################################################################
gml_Object_obj_game_Other_4 (line 149)

This is an image of main obj - room startOoof.png
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Do you have a variable called "event_create" anywhere in the game? The actual error seems to indicate that when you create the asteroid object, IT is referencing this variable, so check the asteroid create event and see... other than that, the DnD blocks you show look correct.
 

Baconleaf

Member
Do you have a variable called "event_create" anywhere in the game? The actual error seems to indicate that when you create the asteroid object, IT is referencing this variable, so check the asteroid create event and see... other than that, the DnD blocks you show look correct.
I ended up finding it was a stupid mistake where I copied over a random# gen and used "xx" as a variable for both instead of one for "yy" so it didn't have a number to go with that variable I was referencing....Starting to get the hang of it. Found the syntax error list at the bottom of the program and it definitely is awesome to have especially for people like me.

also thank you for the reply
 
Top