11.08.2012, 19:14
Hello there
I made a derby script this is the loop which checks which map has the most votes:
But it dont works when:
there are 4 maps: Map1Votes: 3
Map2Votes: 3
Map3Votes: 0
Map4Votes: 0
It will always choose Map1... How to extend this loop that it works how it should?
Thank you very much!!
I made a derby script this is the loop which checks which map has the most votes:
Код:
new highestvar = -1; for(new i = 0; i < sizeof(DerbyMapVotes); i++) { if(DerbyMapVotes[i] > highestvar) { highestvar = DerbyMapVotes[i]; } }
there are 4 maps: Map1Votes: 3
Map2Votes: 3
Map3Votes: 0
Map4Votes: 0
It will always choose Map1... How to extend this loop that it works how it should?
Thank you very much!!