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