Hi,
For this you need a third temporary array that will sort the indexes the way you want.
Typically, if you want to sort by score, duplicate the score array, sort it, and look up the scores in that sorted array and use this index, to then find the unsorted ones, and finally get the player name.
so:
(UNCHANGED)
Array 1 Array 2
Bob 50
Jack 10
Terry 25
Mike 5
( TEMP SORTED )
50
25
10
5
now, let's say you want to know the second best score:
1: get the second item in TEMP SORTED, it's 25
2: in "array 2", find the index of 25, it's 2 ( array indexes starts at 0)
3: in "array 1", get the player name at index it's "TERRY"
Does that make sense?
bye,
Jean