Why is this error here?

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

LeeifMR

Member
Oct 2, 2024
27
1
3
I am making a pvptoggle script (it has some extra stuff too) but I am getting this error at Line 42: This command has multiple arguments, meaning it is not possible to get 'argument'. Use 'argument 1', 'argument 2', ect. Instead?
Code:
on join:
    set {pvptoggle::%player%} to false
    send "&aYour PVP Is Off" to player

command /pvptoggle:
    trigger:
        if {pvptoggle::%player%} is not set:
            set {pvptoggle::%player%} to false
        if player's tool's lore contains "&7Permanently Enables PVP":
            send "&cYou cannot toggle PVP as your item permanently enables it!"
        else if {pvptoggle::%player%} is true:
            set {pvptoggle::%player%} to false
            send "&aPVP Has Been Disabled!"
        else:
            set {pvptoggle::%player%} to true
            send "&aPVP Has Been Enabled!"

# OP commands
command /oppvptoggle [<text>] [<text>] [<text>]:
    permission: op
    trigger:
        if arg-1 is "help":
            send "&eAvailable Commands:"
            send "&e/oppvptoggle all enable &7- Enables PVP for all players"
            send "&e/oppvptoggle all disable &7- Disables PVP for all players"
            send "&e/oppvptoggle player [player] enable &7- Enables PVP for a specific player"
            send "&e/oppvptoggle player [player] disable &7- Disables PVP for a specific player"
            send "&e/pvpenableadd &7- Adds lore to the item that permanently enables PVP"
        else if arg-1 is "all":
            if arg-2 is "enable":
                loop all players:
                    if loop-player's tool's lore does not contain "&7Permanently Enables PVP":
                        set {pvptoggle::%loop-player%} to true
                send "&cPVP Has Been Enabled By A Staff Member." to all players
            else if arg-2 is "disable":
                loop all players:
                    if loop-player's tool's lore does not contain "&7Permanently Enables PVP":
                        set {pvptoggle::%loop-player%} to false
                send "&cPVP Has Been Disabled By A Staff Member (Players holding the Flag Of The Worthy Have Not Been Effected)." to all players
        else if arg-1 is "player":
            if arg-2 is set and arg-3 is set:
                if arg-3 is "enable":
                    set {pvptoggle::%arg-2%} to true
                    send "&cPVP Has Been Enabled For %arg-2%!" to sender
                    send "&aYour PVP Has Been Enabled By A Staff Member!" to arg-2
                else if arg-3 is "disable":
                    set {pvptoggle::%arg-2%} to false
                    send "&cPVP Has Been Disabled For %arg-2%!" to sender
                    send "&aYour PVP Has Been Disabled By A Staff Member!" to arg-2

# Add lore that permanently enables PVP
command /pvpenableadd:
    permission: op
    trigger:
        if player's tool is not air:
            add "&7Permanently Enables PVP" to lore of player's tool
            send "&aThe item you're holding now permanently enables PVP!"
        else:
            send "&cYou need to be holding an item to use this command."

every 15 minutes:
    loop all players:
        send "&cKeep Inventory Is Turned Off! But, PVP Is Turned Off By Default. Do /pvptoggle To Turn It On!" to loop-player