hi, you have put the key call to 'press_paused' inside 'press_paused' so it can't start, lol. Functions can't start themselves, they have to be called from another function.
You can use the main function to do this. You also don't need the wait(1);.
var game_paused = 0;
function press_paused ()
{
if (game_paused == 0)//game not paused
{
set(menu_pan, SHOW);//show menu panel
game_paused = 1;
}
else //game paused
{
reset(menu_pan, SHOW);//hide menu panel
game_paused = 0;
}
}
void main() // first function that is run when game loads
{
on_space = press_paused; // set space key to use press_paused.
}