Sorting in skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

tota1

Member
Sep 27, 2025
3
0
1
Hi!
I have this code:
add 2, 3, 4, 5 and 6 to {_list1::*}
add -2, -3, -4, -5 and -6 to {_list2::*}
sort {_list1::*} in ascending order based on {_list2::%input%}
send {_list1::*}
I am trying to get it to print 6, 5, 4, 3, 2 but it will always stay as 2, 3, 4, 5, 6. Why?
 
oh, its because you're not changing the value of the list variable, it's staying the same.
maybe try: set {_list1::*} to {_list1::*} in descending order based on {_list2::%input%}