ok, here the animation part of the code, but it says that while(1) is wrong, I've tried deleting it, but then it says the next line is wrong.

function animateboxie()
while(1)
{
if(key_d){boxie.pos_x -=24*time_step}
wait(1);
}


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.