• 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!

Game Crashes on object creation

M

MooMoo

Guest
whenever I start my game it wont start and says that one line 2 position 19 it wants a , or a ) I cant figure it out and don't know what to do can someone help

///Throw spear
instance_create(x+=4,y,obj_spear_right);
alarm[0] = room_speed*4

that's my code
 
D

Docker

Guest
x+=4 is your problem, if you're trying to create it 4 pixels right of an instance then use that instances x for example:
obj_player.x+4

Or if the instance_create is being called from the instance already then x+4 should work but don't quote me on that, test and see.
 
Top