Solved If arena is full teleport to another

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

MeHow

Active Member
Feb 6, 2017
140
13
18
22
Lithuania
Hello guys I am idiot and I don't have much ideas about this code:
code_language.skript:
command /random [<player>]:
    executable by: console
    trigger:
        set {western.map} to "western"
        set {snow.map} to "snow"
        set {forest.map} to "forest"   
        set {temple.map} to "temple"   
        if arg-1 is set:
            if {sw.arena.%{forest.map}%.list} <= 8:
                wait 2 ticks
                make arg-1 execute command "/sw join forest"
                stop                                   
            else if {sw.arena.%{snow.map}%.list} <= 12:
                wait 2 ticks
                make arg-1 execute command "/sw join snow"
                stop                               
            else if {sw.arena.%{western.map}%.list} <= 8:
                wait 2 ticks
                make arg-1 execute command "/sw join western"
                stop   
            else if {sw.arena.%{temple.map}%.list} <= 4:
                wait 2 ticks
                make arg-1 execute command "/sw join temple"
                stop                               
            else:
                send "{@prefix} All Arenas are full! Sorry, try again in the few seconds!" to arg-1
                stop

It's not true that they are full :emoji_stuck_out_tongue:, please help me.
Thanks <3
Sk: 2.2
Mc: 1,8
 
Is "{sw.arena.%{forest.map}%.list}" supposed to be a list variable of all the players in the arena? If it is it would be {sw.arena.%{forest.map}%.list::*}
 
Idk your script looks fine to me. Try broadcasting the amount of players in the arenas to see if it's what you expect. Maybe there's something wrong in the code where you set those variables.
 
code_language.skript:
set {western.map} to "western"
should be a local variable if you are only going to use it under one event.

Anyways, is your problem that the players are still being teleported, despite the map suppose to be "full"?
 
Status
Not open for further replies.