#Why is this not working? I cant find the error

1 messages · Page 1 of 1 (latest)

amber basin
#

It always says "You are already in queue"

#

this is how it should work:

If 2 players are in the queue then one player will get auto executed /rtp and then the second will get tped to the other player

amber basin
#

Can anyone help?

iron wasp
#

if {queueset::%player's uuid%} is true:

#

wait no

#

first

#

remove queueset var

#

and u can make it add the player to the queue list and check if the player is in that list

iron wasp
#
            if {queue::*} >= {numqueue}:
                set {queue::*} to 0```
#

remove that

#

and use

#

if {x::*} contains player's uuid:

#

if size of {x::*} >= 2

amber basin
#

x means queue?

iron wasp
#

yea

amber basin
#
    if {numqueue} is not set:
        set {numqueue} to 2
    loop all players:
        if {queueset::%loop-player's uuid%} is not set:
            set {queueset::%loop-player's uuid%} to false

command /queue:
    trigger:
        if {queue::*} contains player's uuid:
            if size of {queue::*} >= 2
                send "&7Teleporting..." to {queuetp::*}
                execute player command "/rtp"
                teleport {queuetp::*} to player
                clear {queuetp::*}
                set {queueset::*} to false
            else:
                send "&aYou have been added to the queue!"
                set {queueset::%player's uuid%} to true
                set {queuetp::%player's uuid%} to player
                add 1 to {queue::*}
        else:
            send "&cYou are already in this queue!" to player

command /setqueue <number>:
    usage: &cAdd a number to set a queue! the default number is 2. 
    permission: op
    trigger:
        set {numqueue} to arg-1
        send "&aSuccessfully set queue to &3%{numqueue}%&a."

command /resetqueue:
    permission: op
    trigger:
        clear {queuetp::*}
        set {queue::*} to 0
        set {queueset::*} to false
        send "&aSuccessfully cleared queue!"```
#

Its like this now and it spams full errors

iron wasp
#

yea

#

u gotta change the rest

#

you gotta do that yourself

amber basin
#

damn

iron wasp
#

you are using to many vars for this

#

you need 2

#

or 1

amber basin
#

the whole skript needs to be rewritten then

iron wasp
#

yea

#

or

#

i can fix the current one

#

you choose

#

you wannt a better system

#

or fix this one

amber basin
#

just the vars?

iron wasp
#

you dont need to store useless stuff

#

u can change it to a ram var

#

easier to add on to

amber basin
iron wasp
#

sure

amber basin
#

Thanks

iron wasp
#

let me load up mc

#
    set {-numqueue} to 2

command /queue:
    trigger: 
        if {-queueset::%player's uuid%} is not set:
            if {-queue} >= {-numqueue}:
                send "&7Teleporting..." to {-queuetp::*}
                execute player command "/rtp"
                wait 1 second
                
                teleport {-queuetp::*} to player
                set {-queue} to 0
                delete {-queuetp::*}
                delete {-queueset::*}
            
            else:
                send "&aYou have been added to the queue!"
                set {-queueset::%player's uuid%} to true
                add player to {-queuetp::*}
                add 1 to {-queue}
        else:
            send "&cYou are already in this queue!" to player

command /setqueue <number>:
    usage: &cAdd a number to set a queue! the default number is 2.
    permission: op
    trigger:
        set {-numqueue} to arg-1
        send "&aSuccessfully set queue to &3%{-numqueue}%&a."

command /resetqueue:
    permission: op
    trigger:
        delete {-queuetp::*}
        set {-queue} to 0
        delete {-queueset::*}
        send "&aSuccessfully cleared queue!"```
#

try that

#

@amber basin

amber basin
#

We are both in the queue

iron wasp
#

debug

amber basin
iron wasp
#

!debug

#

uh

#

try sending the variables

#

to see if they are correct

amber basin
#

What do you mean

iron wasp
#

broadcast {x}

#

{x} is the variable

amber basin
#

Yeah

#

Which variables?

#

from the skript?

#

All?

iron wasp
#

any

amber basin
#

{-queueset::*}

iron wasp
#

in the /queue command

amber basin
iron wasp
#

hold up

#

ik why

#
on load:
    set {-numqueue} to 2

command /queue:
    trigger: 
        if {-queueset::%player's uuid%} is not set:
            send "&aYou have been added to the queue!"
            set {-queueset::%player's uuid%} to true
            add player to {-queuetp::*}
            add 1 to {-queue}

            if {-queue} >= {-numqueue}:
                send "&7Teleporting..." to {-queuetp::*}
                execute player command "/rtp"
                wait 1 second
                
                teleport {-queuetp::*} to player
                set {-queue} to 0
                delete {-queuetp::*}
                delete {-queueset::*}
        else:
            send "&cYou are already in this queue!" to player

command /setqueue <number>:
    usage: &cAdd a number to set a queue! the default number is 2.
    permission: op
    trigger:
        set {-numqueue} to arg-1
        send "&aSuccessfully set queue to &3%{-numqueue}%&a."

command /resetqueue:
    permission: op
    trigger:
        delete {-queuetp::*}
        set {-queue} to 0
        delete {-queueset::*}
        send "&aSuccessfully cleared queue!"```
amber basin
#

works!

#

Thanks!

iron wasp
#

np

amber basin
#

Could you make /leavequeue also?

iron wasp
#

you might want to add this to your skript config

#

the pattern should be that

#

and reload config

iron wasp
#

try it

amber basin
#

should be easy

iron wasp
#

ye

amber basin
iron wasp
#

nice

#

these are ram variables

amber basin
#

thank you very much

iron wasp
#

and save in ram

#

np

amber basin
#

@iron wasp Is it possible to add a glowing effect to both of the players? (i dont know what to argument to use for the player)

iron wasp
amber basin
#

also if one of them dies then both glowing effects should be removed

#

do i need a extra skript for that?

iron wasp
#
amber basin
amber basin
iron wasp
#

yea

amber basin
#

do i need 2 lines for that?

#

is there a document for the glowing effect or of all effects

amber basin
iron wasp
#

you gotta learn basic skript essenials like reading docs

#

apply potion of glowing 1 without particles to player for 1 days

amber basin
#

It only works to the player who executes /rtp

iron wasp
#

please learn skript...

amber basin
#

Im Super new to Skript im learning it but it worked before then I changed smth and now it doesn’t work

iron wasp
#

you gotta give it to the entire list