top %integer% elements of %objects% (mirrorutils)

  • 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!

Status
Not open for further replies.

Dave

Active Member
Jul 20, 2018
227
9
18
Hi, I'm trying to get the top 5 values of objects but doesnt works
Skript version: 2.2 fixesv8 (Im running 1.8.8) and using MirrorUtils.sk
Addons: skript-mirror 2.0.0

Here's my code
Code:
command /top [<text>]:
    usage: /top <kills|deaths>
    trigger:
        if arg-1 is set:
            if arg-1 is "kills":
                set {_top::*} to top 5 elements of {kills::*} as "&f##<pos>. &e<index> &7- <value>"
                loop {_top::*}:
                    send "%loop-value%"
                stop
            else if arg-1 is "deaths":
                set {_top::*} to top 5 elements of {deaths::*} as "&f##<pos>. &e<index> &7- <value>"
                loop {_top::*}:
                    send "%loop-value%"
                stop
        else:
            send "&cUsage: /top <kills|deaths>"

[03:26:01] [pool-2-thread-1/WARN]: [Skript] No matching method: Variable#getName called without arguments
[03:26:01] [pool-2-thread-1/WARN]: [Skript] Did you misspell the method? You may have meant to type one of the following:
[03:26:01] [pool-2-thread-1/WARN]: [Skript] * getTime
[03:26:01] [pool-2-thread-1/WARN]: [Skript] * setTime
[03:26:01] [pool-2-thread-1/WARN]: [Skript] * getRaw
[03:26:01] [pool-2-thread-1/WARN]: [Skript] method Variables#getVariable called with (null (Null), ScriptCommandEvent (ScriptCommandEvent), false (Boolean)) threw a NullPointerException: null

[03:26:01] [pool-2-thread-1/WARN]: [Skript] No matching constructor: ArrayList#<init> called with (<none> (Object))
[03:26:01] [pool-2-thread-1/WARN]: [Skript] No matching method: Collections#reverse called with (<none> (Object))
[03:26:01] [pool-2-thread-1/WARN]: [Skript] Did you pass the wrong parameters? Here are the parameter signatures for reverse:
[03:26:01] [pool-2-thread-1/WARN]: [Skript] * reverse(java.util.List)
 
Last edited:
Status
Not open for further replies.