Code: Select all
int scores[5] = { 200, 300, 100, 400, 0 };
int scoresarranged[5];
int scoredone[5];
//sort
int numberofscores;
int ishigh;
int reverse;
int highestarray;
script 26 (void) {
scores[4] = points;
numberofscores = 4;
ishigh = 0;
reverse = 0;
while(numberofscores >= 0) {
for(int x = 0; x <= 4; x++);
if(ishigh > scores[x] && scoredone[x] != 1) {
ishigh = scores[x];
highestarray = x;
}
scoresarranged[reverse] = ishigh;
scoredone[highestarray] = 1;
ishigh = 0;
}
reverse++;
numberofscores--;
delay(1);
for(int y = 0; y <= 4; y++){
scoredone[y] = 0;
}
restart;
}