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

[HELP] rsort()

Comments in 'Plugin Development' started by PEMapModder, Apr 13, 2014.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Hello, these two days I am working on a new project called Inventory-GUI, and I am wondering how I can make rsort() work for priorities here? Because I found out that rsort() would mess up with the keys.
    Last edited: Apr 14, 2014
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Why do help threads get ignored so easily...
  3. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    most of the extreme hardcore devs arent around to look at this. since we, amateurs doesnt have any ideas about that, we have no point to discuss with it.
    PEMapModder likes this.
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I just saw @wies online yesterday at dawn...
  5. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Could you use arsort()? It preserves key associations.
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Thanks! In fact, I just don't even know why won't rsort() preserve the keys, and rsort() is not a function listed in related functions of arsort().
    Last edited: Apr 14, 2014
    Falk likes this.

Share This Page

Advertisement