1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sorting entries in a token or array?

Discussion in 'Scripts' started by greatguys1, May 26, 2018.

  1. greatguys1

    greatguys1 Active Adventurer Developer Warriors of the North

    279
    34
    Apr 20, 2013
    Yes
    Does a function exist to sort entries in a token or array to be alphabetized?
     
  2. Thothie

    Thothie Administrator Staff Member Administrator Moderator Developer

    15,079
    54
    Apr 8, 2005
    psycho-oligist
    lost
    Eh... Nope. $sort_entlist() does range, hp, maxhp, mp, and maxmp, but that's it.

    It'd be simple enough to code/script a sort for token arrays (fine scriptside, provided you aren't doing it often). With real arrays though, bit screwier, seems sometimes you gotta be careful about rapidly removing elements from real arrays (and never use "erase"), so any sort method that uses another array is risky.
     

Share This Page