Loop error

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

ForPlay_HD

Member
Aug 23, 2018
11
0
1
Hi.
I've tried to make a ban skript plugin, but again something is wrong in my code...
Every 60 seconds in all worlds, the system loop all offline players, and if loop player is banned, subtract 1 from his ban time.

code:
code_language.skript:
every 10 seconds:
    loop all offline players:
        if {ban.%loop-player%} is true:
            subtract 1 from {bantime.%loop-player%}
            if {bantime.%loop-player%} = 0:
                set {ban.%loop-player%} to false
                set {bantime.%loop-player%} to 0

error:
code_language.skript:
There's no loop that matches 'loop-player', (ban.sk, line 98: if {ban.%loop-player%} is true:)
 
try this loop-offlineplayer
like
code_language.skript:
{ban.%loop-offlineplayer%}
 
Hi.
I've tried to make a ban skript plugin, but again something is wrong in my code...
Every 60 seconds in all worlds, the system loop all offline players, and if loop player is banned, subtract 1 from his ban time.

code:
code_language.skript:
every 10 seconds:
    loop all offline players:
        if {ban.%loop-player%} is true:
            subtract 1 from {bantime.%loop-player%}
            if {bantime.%loop-player%} = 0:
                set {ban.%loop-player%} to false
                set {bantime.%loop-player%} to 0

error:
code_language.skript:
There's no loop that matches 'loop-player', (ban.sk, line 98: if {ban.%loop-player%} is true:)

Thank you again! :emoji_slight_smile:)
 
Status
Not open for further replies.