This will reset when you restart the game. If you want to have it save them, you'll have to work out a way to dump the data to a file.
this code will generate a basic top ten high score table
type scores
name as string
score as integer
endtype
dim highscores(10) as scores
for i = 0 to 9
highscores(i).name = "Lucy"
highscores(i).score = 100 * (10 - i)
next i
This code is a function to print out the high score table
function printhighscores()
for i = 0 to 9
print str$(i + 1) + ": " + highscores(i).name + " " + highscores(i).score
next i
endfunction
then any time you want to print the high scores, just run "printhighscores()"
I'm a little too sleepy right now to actually bother writing code to go through, sort through the array and find the place to insert the new high score and filter bump out the lowest one.
I can say this much though, the logic is roughly the same as setting the high score, it just involves checking to the current score against the scores in the list to find out which one it's greater than, bump all the ones from that one and on downward, and replace it.
To do a quick little check, you can check the current score against the lowest one (which would be like highscore(9))... if it's greater than highscore(9) then obviously it belongs in the list somewhere.
No matter where you are... everyone is always connected.