#Variable being set is unable to be checked?

1 messages · Page 1 of 1 (latest)

wise whale
#

Working on a clans skript, creation works fine, until you try creating another one while already having a clan, then it doesn't send the error message. /c delete also can't check is the players clan is set for some reason and immediately breaks. Any help would be appreciated.

#

The entirety of the /c create command works properly when trying to create a clan, however, nothing works after the playerClan is set

#

I don't quite understand why

            deleteClan(player)``` is causing an error.
dense heron
#

try just arg 1 (without the hyphen)

dense heron
#

also on that line, the line after is not indented enough

wise whale
#

Oh, I'm dumb... I missed is

wise whale
#

Odd, for some reason if I change it to work this way

    set {_uuid} to uuid of {_p}
    send "IntoCommandCheck" to {_p}
    if {playerClan::%{_uuid}%} is set:
        send "{@prefix} &7You are already in another clan!" to {_p}
    else if {playerClan::%{_uuid}%} is not set:
        send "IntoPlayerCheck" to {_p}```
it works as intended, but sending it just into another if block without defining what it is we are checking, it breaks
wise whale
#

I swear, the if/else if function in my skript is freaking out lol

#
            if arg-2 is set:
                if {playerclan::%player's uuid%} is set:
                    set {_playerInvited} to arg-2 parsed as offline player
                    clanInvite({_playerInvited}, {playerclan::%player's uuid%}, player)
                else:
                    send "{@prefix} &7You must be in a clan to do this!"
            else if arg-2 isn't set:
                send "{@prefix} &7Invalid syntax: use &d/clan invite <player>"```
runs both outputs even if arg-2 is set
#

It stills sends
send "{@prefix} &7Invalid syntax: use &d/clan invite <player>"
even when arg-2 is set and the invite is sent.

#

I figured it out I believe, syntax errors.

dense heron
#

at the end of your if arg-2 is set section (right after the you must be in a clan line), add a line (remove 1 indent from it so it's lined up with else right before it) and put stop, this will prevent the code from going any further

wise whale
#

I figured it out, it was because I was using tab indexes, but vscode was inserting spaces in other places.

#

It had everything jacked up

dense heron
#

then Skript should've given you an error saying you can't use both

wise whale
#

It didn't lol