Hologram Top 5 Leaderboard

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

    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.

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
22
Plugins Installed:
Skript v2.2
SkQuery
Umbaska
SkDragon
HolographicDisplays

Server Version:
Spigot-1.8-version

Question:
Why does my code not recognize the loop-index?
https://gyazo.com/e795496066943eef7c038a17652b9181

Code:
code_language.skript:
every 5 seconds:
    loop {Kills::*}:
        add 1 to {_size}
        if {_LowToHigh::%loop-value%} is not set:
            set {_LowToHigh::%loop-value%} to loop-index
        else:
            set {_n} to 0
    loop {_size} times:
        set {_n} to {_n}+1
        if {_LowToHigh::%loop-value-1%::%{_n}%} is not set:
            set {_LowToHigh::%loop-value-1%::%{_n}%} to loop-index
            exit loop
            set {_n} to size of {_LowToHigh::*}
    loop {_LowToHigh::*}:
        set {_HighToLow::%{_n}%} to loop-value
        set {_n} to {_n}-1
        set {_num} to 0
    loop {_HighToLow::*}:
        add 1 to {_num}
        execute console command "/hd setline top5 %{_num} + 2% &a%loop-value%&8: &e%{Kills::%loop-value%}%"
    if {_num} is 5:
        stop
 
Status
Not open for further replies.