@EvilSOB:
You reckon that your code will never execute the "my.z += 10;" part?
The problem is this section:
space_pressed = 1;
if(space_pressed==0) player.z += 10;
First you set space_pressed to 1 and then check if its 0. But at that point it'll never be 0 because you set it to 1 first.
Try replacing the whole jumping part with:
if(key_space}
{
space_pressed = 1;
}
else
{
if(space_pressed)
{
space_pressed = 0;
my.z += 10;
}
}