20.05.2014, 21:00
Let's say you have map[0] = 8, map[1] = 2....map[4] = 5.
I'm sure there are better ways but this should work
now map[index] is the array with the largest value.
But of course you have to change "4" to the number of maps and store values in an array.
I'm sure there are better ways but this should work
Код:
new index, largest; // Loop through the whole array. for(new i = 0; i < 4; i++) { if(map[i] > largest) { // Update the index index = i; // Update the largest value. largest = map[i]; } }
But of course you have to change "4" to the number of maps and store values in an array.