For a high score list the easiest way is to use "save array" and "load array".
This will load the old score list, print it out, make a new score, add it to the list (if it's high enough), and save the scores to "Scores.dat".
` Dimensionalize the array to store scores
dim Score$(9,1)
` Score$(x,0) = Name
` Score$(x,1) = Score
` Load old score file
if file exist("Scores.dat")
load array "Scores.dat",Score$(0)
endif
` This is in a loop so you can see the changes without having to rerun it over and over again
do
` Print the scores
cls
print "-=[ High Scores]=-"
for t=0 to 9
print str$(t+1)+". "+Score$(t,0)+" "+Score$(t,1)
next t
wait key
` Make a new score to add
n=rnd(1)
if n=0 then Name$="Crzy Programmer"
if n=1 then Name$="Grog Grueslayer"
Score=rnd(50000)
` Check the scores to see if the new score is on the list
for t=0 to 9
` If the current score is more than score$(t,1)
if Score>val(Score$(t,1))
` Move all the scores down one
for t2=8 to t step -1
Score$(t2+1,0)=Score$(t2,0)
Score$(t2+1,1)=Score$(t2,1)
next t2
` Add the new score and exit the for/next loop
Score$(t,0)=Name$
Score$(t,1)=str$(Score)
exit
endif
next t
` Save the scores
save array "Scores.dat",Score$(0)
loop
If you have any questions about the code i'll be happy to answer them.