I prefer Functions because I found a way to make it return multiple variables (without using globals).
ex:
(I have posted this somewhere else in these forums, go look for it)
First you declare your function:
Fuction MyExampleFunction(a,b,c,d)
In the last line before endfunction you collect all the variables that should be exported into one and seperate them with
different chars (ex. ;,:,/,-,€):
OutPut$=Str$(MyInteger)+";"+MyString$+"€"+Str$(MyInteger2)
EndFunction OutPut$
Now declare 2 new functions, one called GetBefore$(Search$,String$) and the other GetAfter$(Search$,String$).
I don't remember these so I cannot post them here right now (while in school).
But basically the first function (GetBefore), will return the contents of a string before "Search$" in "String$". And the other will return the letters after "Search$". (Hope you understood this) Ex:
Return$=MyExampleFunction(1,2,3,4)
PlayerNumber=Val(GetBefore(";",Return$))
PlayerName$=GetBefore("€",GetAfter(";",Return$))
PlayerScore=Val(GetAfter("€",Return$))
At this moment the variables would be.
Return$="42;TheCyborg€8529"
PlayerNumber=42
PlayerName$="TheCyborg"
PlayerScore=8529
Good luck
--> TheCyborg