Solved Can't leave queue that I joined.

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

TehNitro

New Member
Aug 11, 2023
6
0
1
When I join the queue it works perfectly fine, but when I try to leave the queue I can't. (There's no errors)

Code:
on inventory click:
    if event-inventory = (metadata tag "queueGUI" of player):
        cancel event
        if index of event-slot is 11:
            if {Queued::*} contains player:
                send "&7You are already in a queue." to player
            else:
                if {Axe-Queue::*} contains player:
                    remove player from {Axe-Queue::*}
                    send "&7Removed you from &baxe &7queue."
                else:
                    add player to {Axe-Queue::*}
                    add player to {Queued::*}
                    send "&7Added you to &baxe &7queue."
                    play sound "block.note_block.pling" at volume 1 and pitch 3 to player
#
        else if index of event-slot is 13:
            if {Queued::*} contains player:
                send "&7You are already in a queue." to player
            else:
                if {Sword-Queue::*} contains player:
                    remove player from {Sword-Queue::*}
                    send "&7Removed you from &bsword &7queue."
                else:
                    add player to {Sword-Queue::*}
                    add player to {Queued::*}
                    send "&7Added you to &bsword &7queue."   
                    play sound "block.note_block.pling" at volume 1 and pitch 3 to player   
#       
        else if index of event-slot is 15:
            if {Queued::*} contains player:
                send "&7You are already in a queue." to player
            else:
                if {Nethpot-Queue::*} contains player:
                    remove player from {Nethpot-Queue::*}
                    send "&7Removed you from &bnetherite pot &7queue."
                else:
                    add player to {Nethpot-Queue::*}
                    add player to {Queued::*}
                    send "&7Added you to &bnetherite pot &7queue."
                    play sound "block.note_block.pling" at volume 1 and pitch 3 to player
 
You can't leave the queue because you haven't coded it too? You check if the player is in {Queued::*} which they would be once joining the queue, but then you only send a message saying they're in the queue.