- Joined
- Jan 12, 2010
- Messages
- 132
So ,I have this code that is supossed to calculate the players top based on players overall score.It work fine if players score arent equal.If are equal one or mere is doomed.All top place 1st 2nd etc are ocuped by one player.How should it look to work fine?
Players 2-5 are players used on my map.
Top is supposed to be a ranking.
So if all players score are different it`s work very fine but if players score are same its messed with one players ocuping all place (ex: 1st 2nd 3th etc).
So if u have any ideea (a good one ) replay pls..else..
-
For each (Integer A) from 2 to 5, do (Actions)
-
Loop - Actions
- Set Score_total[(Integer A)] = ((Player((Integer A))) Total Overall Score)
-
Loop - Actions
-
Player Group - Pick every player in PPL_gr and do (Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 4, do (Actions)
-
Loop - Actions
- Set Score = Score_total[((Integer A) + 1)]
- Set B = ((Integer A) + 1)
-
For each (Integer B) from 1 to 4, do (Actions)
-
Loop - Actions
- Set C = (C + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Score Greater than or equal to Score_total[((Integer B) + 1)]
-
Then - Actions
- Set Rank[B] = (Rank[B] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- C Equal to 4
-
Then - Actions
- If (Rank[B] Equal to 4) then do (Set Top[1] = (Player(B))) else do (Do nothing)
- If (Rank[B] Equal to 3) then do (Set Top[2] = (Player(B))) else do (Do nothing)
- If (Rank[B] Equal to 2) then do (Set Top[3] = (Player(B))) else do (Do nothing)
- If (Rank[B] Equal to 1) then do (Set Top[4] = (Player(B))) else do (Do nothing)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Loop - Actions
-
For each (Integer A) from 1 to 4, do (Actions)
-
Loop - Actions
Players 2-5 are players used on my map.
Top is supposed to be a ranking.
So if all players score are different it`s work very fine but if players score are same its messed with one players ocuping all place (ex: 1st 2nd 3th etc).
So if u have any ideea (a good one ) replay pls..else..
Last edited: