Skript Showing Unknown Command

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

pokw

Active Member
Jun 3, 2019
53
1
8
I recently made a skript and it is showing no errors but it is showing an unknown command whenever I type in /guild.

I'm not exactly sure what skript version I'm in or how to get it but I believe I should be on the latest version.


Code:
variables:
    {%player%.guildmember} = false



command /guild [<text>] [<text>] [<text>]:
    aliases: /guilds, /g
    usage: /guild [<arg 1>] [<arg 2>]
    trigger:
        if arg 1 is set:
            if arg 1 is "create":
                if arg 2 is set:
                    if {%player%.guildmember} is true:
                        send "&c&lFFight &8&l> &r&cYou are already in a guild."
                        stop
                    else:
                        if {%arg 2%.guildexist} is false:
                            set {%arg 2%.guildexist} to true
                            set {%arg 2%.%player%.owner} to true
                            set {%player%.guildmember} to true
                            broadcast "&c&lFFight &8&l> &r&2%arg 2% &aguild has been created by &2%player%&a."
                            stop
                        else if {%arg 2%.guildexist} is true:
                            send "&c&lFFight &8&l> &r&cThat guild already exists."
                            stop
                        else:
                            set {%arg 2%.guildexist} to true
                            set {%arg 2%.%player%.owner} to true
                            set {%player%.guildmember} to true
                            broadcast "&c&lFFight &8&l> &r&2%arg 2% &aguild has been created by &2%player%&a."
                            stop
                else:
                    send "&c&lFFight &8&l> &r&cInvalid arguments. Please supply a guild name."
            else if arg 1 is "leave":
                if arg 2 is set:
                    if {%arg 2%.%player%.guildmember} is true:
                        if {%arg 2%.%player%.owner} is true:
                            broadcast "&c&lFFight &8&l> &r&2%player% &ahas disbanded &2%arg 2% &aguild."
                            set {%player%.guildmember} to false
                            set {%arg 2%.%player%.guildmember} to false
                            set {%arg 2%.guildexist} to false
                            set {%arg 2%.%player%.owner} to false
                            loop all players:
                                if {%arg 2%.%player%.member} is true:
                                    broadcast "&c&lFFight &8&l> &r&2%player% &ahas left &2%arg 2% &aguild."
                                    set {%player%.guildmember} to false
                                    set {%arg 2%.%player%.guildmember} to false
                                    stop
                                else:
                                    stop
                                  
                        else:
                            broadcast "&c&lFFight &8&l> &r&2%player% &ahas left &2%arg 2% &aguild."
                            set {%player%.guildmember} to false
                            set {%arg 2%.%player%.guildmember} to false
                            stop
                    else:
                        send "&c&lFFight &8&l> &r&cYou are not a member of that guild."
                        stop
                else:
                    send "&c&lFFight &8&l> &r&cInvalid arguments. Please supply guild name."
            else if arg 1 is "invite":
                if arg 2 is set:
                    if arg 3 is set:
                        if {%arg 3%.%player%.owner} is true:
                            send "&c&lFFight &8&l> &r&aSuccessfully invited &2%arg 2%&a."
                            loop all players:
                                if name of player is arg 2:
                                    send "&c&lFFight &8&l> &r&2%player% &ainvited you to &2%arg 3% &aguild."
                                    set {%player%.%arg 3%.invited} to true
                                    stop
                                else:
                                    stop
                        else:
                            send "&c&lFFight &8&l> &r&cYou are not the owner of this guild."
                    else:
                        send "&c&lFFight &8&l> &r&cPlease supply a guild name."
                else:
                    send "&c&lFFight &8&l> &r&cPlease supply a player to invite."
                    stop
            else:
                send "&c&lFFight &8&l> &r&cInvalid arguments. Arguments: &4create&c, &4join&c, &4leave&c, &4invite&c."
                stop
            else if arg 1 is "join":
                if arg 2 is set:
                    if {%arg 2%.guildexist} is true:
                        if {%player%.%arg 3%.invited} is true:
                            if {%player%.guildmember} is false:
                                broadcast "&c&lFFight &8&l> &r&2%player% &ahas joined &2%arg 2% &aguild."
                                set {%player%.guildmember} to true
                                set {%arg 2%.%player%.guildmember} to true
                            else:
                                send "&c&lFFight &8&l> &r&cYou are already a member of a guild."
                        else if {%player%.%arg 3%.invited} is false:
                            send "&c&lFFight &8&l> &r&cYou aren't invited to this guild."
                            stop
                        else:
                            send "&c&lFFight &8&l> &r&cYou aren't invited to this guild."
                            stop
                    else:
                        send "&c&lFFight &8&l> &r&cThat guild doesn't exist."
                        stop
                else:
                    send "&c&lFFight &8&l> &r&cInvalid arguments. Please supply a guild name."
                    stop
        else:
            send "&c&lFFight &8&l> &r&cInvalid arguments. Arguments: &4create&c, &4join&c, &4leave&c, &4invite&c."
            stop
 
Last edited:
Status
Not open for further replies.