Because the script is read from the top to the bottom. But you're calling something that doesn't exist until x amount of lines down.
Just move the gMain_menu_Click function above on_mouse_click.
~Trent
PS-Are you sure you don't mean mouse.x and mouse.y, instead of player.x and player.y?
Just move the gMain_menu_Click function above on_mouse_click.
~Trent
PS-Are you sure you don't mean mouse.x and mouse.y, instead of player.x and player.y?