View Single Post
shauli
Member
Join Date: Jun 2018
Old 09-05-2018 , 14:54   Re: Questions and suggestions about ArrayFindString and sorting natives
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
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?

Last edited by shauli; 09-05-2018 at 14:54.
shauli is offline