|
-
Jan 10th, 2001, 12:30 AM
#1
Thread Starter
Addicted Member
Hiyas,
I'm trying to arrange people's rank/position according to how high their score is. It works fine, unless there's 2 scores (or possibly more - I haven't tested that) which are the same. The output will end up something like this:
1., 2., 4., 4., 5., 6.
But it should be:
1., 2., 3., 3., 4., 5.
I'm assuming that if there was 3 numbers the same it'd look like:
1., 2., 4., 4., 4., 5.
Here's the code.
Code:
For NumberOfPlayersArray = 1 To NumberOfPlayers
Players(NumberOfPlayersArray).Position = NumberOfPlayers
For PlayersPositionCheckArray = 1 To NumberOfPlayers
If Players(NumberOfPlayersArray).Score > Players(PlayersPositionCheckArray).Score And Not PlayersPositionCheckArray = PlayersScoreCheck Then
Players(NumberOfPlayersArray).Position = Players(NumberOfPlayersArray).Position - 1
End If
Next PlayersPositionCheckArray
Next NumberOfPlayersArray
Can anyone please help? I tried to fix it but it didn't work. =/
-Git
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|