Clacker use the "
End" command at the bottom of your Main program, and place Gosubs under that:
Randomize Timer()
PLAYERMOVE=Rnd(1)
If PLAYERMOVE=1
Gosub MOVEPLAYER
Else
Print "Nothing happening, so press a key to exit!"
EndIf
Wait Key
Print "Goodbyeeeeeeeeeeeeee!"
Wait 1000
End : Rem Put stuff you don't want the computer to execute underneath here
MOVEPLAYER:
Print "Hello mummy! (Press a key)"
Return
Function DoobyDoo()
Rem When creating functions use "ExitFunction" in the same way as "End" above
PLAYERMOVE=1
If PLAYERMOVE=1
Gosub FUNCMOVEPLAYER
endif
ExitFunction : Rem Gosub's will be placed under here, so they only get used when called
FUNCMOVEPLAYER:
Print "Hello mummy!"
Return
EndFunction