Quote:
Originally Posted by Arkshine
You are supposed to compare the elements.
Code:
public sort(elem1, elem2)
{
if (elem1 < elem2) return -1;
if (elem1 == elem2) return 0;
if (elem1 > elem2) return 1;
}
|
That's if I have an array of integers. This was just an example for the post. Lets say I have an array of SteamIDs + points to each key, if 2 SteamIDs have the same amount of points their index will still change.
Some comments on my 2nd suggestion?