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

Mac OSX Simple Movement Problem causes whole game to crash

S

SUTTMMUD

Guest
So ive worked on a game for a while now, and all the characters share the same step event to enable diagonal movement;

if keyboard_check(ord("W")) && place_free(x,y-3) {y-=3}
if keyboard_check(ord("S")) && place_free(x,y+3) {y+=3}
if keyboard_check(ord("D")) && place_free(x+3,y) {x+=3}
if keyboard_check(ord("A")) && place_free(x-3,y) {x-=3}

For whatever reason, for the first time ever since i started making the game, whenever i start it up, this error message appears;

___________________________________________
FATAL ERROR in
action number 1
of Step Event
for object obj_Player:

COMPILATION ERROR in code action.
Error in code at line 3:
if keyboard_check(ord("D")) && place_free(x+3,y) {x+=3}

at position 52: Variable name expected.



It has never done this until today, and I've worked on this game for a few months now.

I am using Version 7.5 (for Mac)

I even copied the exact same step event into a different object, as a test on a completely different game, and it worked.

Is my current game completely unifixable or is there something im missing here?

If anyone has any idea I would be so so so grateful as I've spent so long on this game.

- Thanks
 
S

SUTTMMUD

Guest
I have found out that the game document itself has lost its knowledge of x and y variables, as I've applied trial and error and found that each error message position always starts at an x or y in the code. ?? Anyone please help?
 
Top