playerdir is GS1, to make it GS2 u put a dot in-between player and dir.
also if u could use the RC styling command, it would get a lot easier to read for many of us.
Edit: with that i mean there should be some more spaces in the script, for example "player.y+=2;" should be "player.y += 2;", it both looks cleaner and gets a lot easier to read.
PHP Code:
BAD:
player.x-=10;
GOOD:
player.x -= 10;
hope u won't take this the wrong way.