ToneDogg
May 30th, 2000, 01:48 AM
I'm making a highscores list for my game using files, so next time they run the program the scores are still there blah blah blah. I have 10 spots on the list and when I get score thats eligible for the list, I need to resort the data in descending order. For example...
Jonny has 10
Billy has 7
Mike has 4
Then someone gets a 8. I would have to bump Billy and Mike down and put the new guy in there... is there any shortcut to sorting an array of integers from greatest to least or least to greastest? Or do I have to use 600 if statements like I have been doing (which is really a pain :( )? Please help me if you can and thanks in advance..
- Fed up programmer :(
Jonny has 10
Billy has 7
Mike has 4
Then someone gets a 8. I would have to bump Billy and Mike down and put the new guy in there... is there any shortcut to sorting an array of integers from greatest to least or least to greastest? Or do I have to use 600 if statements like I have been doing (which is really a pain :( )? Please help me if you can and thanks in advance..
- Fed up programmer :(