Mike Halliday
11-02-2007, 12:07 AM
Here is a highscore routine
Read from file, write to file and display on screen!
Highscores.dat contains 10 scores and names
3 extra funcs/procs
readHIGHSCORES() - loads the file in to global array, returning FALSE if the file is not found.
sortHIGHSCORES() - bubble sorts high to low and dumps the lowest from the list
writeHIGHSCORES() - updates the highscores.dat file
If the highscores.dat file is missing you are warned that saves are unavailable and temp score are created.
Hope its useful! - See how it works in the example code.
[Mike][br]1193958437_671_FT0_highscores.zip
Read from file, write to file and display on screen!
Highscores.dat contains 10 scores and names
3 extra funcs/procs
readHIGHSCORES() - loads the file in to global array, returning FALSE if the file is not found.
sortHIGHSCORES() - bubble sorts high to low and dumps the lowest from the list
writeHIGHSCORES() - updates the highscores.dat file
If the highscores.dat file is missing you are warned that saves are unavailable and temp score are created.
Hope its useful! - See how it works in the example code.
[Mike][br]1193958437_671_FT0_highscores.zip