There are multible loops that match loop-item error

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

Dressi

Member
Aug 6, 2017
2
0
1
Hello everyone

I have some problems with my skript. it's a GUI skript where I want to give the player an opportunity to upgrade specific weapons. First, they will need to get the opportunity to enchant e.g sharpness 1 and then after be able to upgrade the enchantment to sharpness 2 so it would be awesome if anyone of you could tell me what I am doing wrong :emoji_slight_smile:

So here is my code:
Code:
on join:
    if player has permission "vagt":
        if {brød.%player%} is not set:
            set {brød.%player%} to 0
        if {fangedrab.%player%} is not set:
            set {fangedrab.%player%} to 0
        if {vagtdød.%player%} is not set:
            set {vagtdød.%player%} to 0
        if {sword.%player%} is not set:
            set {sword.%player%} to 0
        

on pick up of bread:
    if player have permission "vagt":
        add 1 to {brød.%player%}
        
on pick up of iron sword, wood sword, stone sword or diamond sword:
    if player have permission "vagt":
        add 1 to {sword.%player%}
        
on death:
    if victim has permission "vagt":
        add 1 to {vagtdød.%victim%}
    
on death:
    if attacker have permission "vagt":
        add 1 to {fangedrab.%attacker%}
        
on sign change:
    line 1 of block is "vagtmenu"
    line 2 of block is "c"
    if player has permission "*":
        set 1st line to "&c&m-------------"
        set 2nd line to "&8[&c&lVAGTMENU&8]"
        set 3rd line to "&c&lC"
        set 4th line to "&c&m-------------"

On rightclick on sign:
    line 1 of block is "&c&m-------------"
    line 2 of block is "&8[&c&lVAGTMENU&8]"
    line 3 of block is "&c&lC"
    line 4 of block is "&c&m-------------"
    if player have permission "vagt":
        execute player command "/vagt"

command /vagt:
    permission: vagt
    trigger:
        wait 3 ticks
        open chest with 5 rows named "&c&l&nVAGT MENU" to player
        format slot 0 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 1 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 2 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 6 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 7 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 8 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 9 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 17 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 13 of player with nether star named "&c&lVAGT MENU" with lore "||&7Her kan du se og tage:||&cVagt Kits!||&cVagt Stats||&cVagt Regler!" to close then run [execute player command "/vagt"]
        format slot 20 of player with golden helmet named "&3&lVAGT KITS" with lore "||&fKit &cC-Vagt||&fKit &cC-Officer||&fKit &cC-Inspektør" to close then run [execute player command "/vagtkits"]
        format slot 22 of player with Paper named "&3&lVAGT STATS" with lore "||&7DRAB: &c%{fangedrab.%player%}%||&7DØDE: &c%{vagtdød.%player%}%||&7ANTAL BRØD SAMLET OP: &c%{brød.%player%}%||&7ANTAL SVÆRD SAMLET OP: &c%{sword.%player%}%" to be unstealable
        format slot 24 of player with beacon named "&3&lVAGT REGLER" with lore "||&7Tryk for at se reglerne!" to close then run [execute player command "/vagtregler"]
        format slot 29 of player with iron chestplate named "&c&lVAGT SHOP/UPGRADE" with lore "||&7Her kan du købe nyt vagt gear||&7Eller opgradere dit gamle" to close then run [execute player command "/vagtsu"]
        format slot 31 of player with Diamond named "&4&lBuffs" with lore "&r&a%player% &bTryk her for at modtage dine buffs" to close then run [execute player command "/ebuffs"]
        format slot 27 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 35 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 36 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 37 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 38 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 40 of player with anvil named "&c&lUDGANG" with lore "||&7Tryk for at forlade vagt menuen!" to close
        format slot 42 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 43 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 44 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        stop

command /vagtsu:
    permission: vagt
    trigger:
        wait 3 ticks
        open chest with 5 rows named "&c&l&nVAGT MENU" to player
        format slot 0 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 1 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 2 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 6 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 7 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 8 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 9 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 17 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 13 of player with nether star named "&c&lVAGT KITS" with lore "||&7Her kan du tage:||&cVagt Kits!" to close then run [execute player command "/vagt"]
        format slot 20 of player with golden helmet named "&c&lVAGT SHOP" with lore "||&7Her kan du købe nyt vagt gear" to close then run [execute player command "/vagtshop"]
        format slot 24 of player with enchanted book named "&c&lVAGT UPGRADE" with lore "||&7Her kan du opgradere dit vagt gear" to close then run [execute player command "/vagtupgrade"]
        format slot 27 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 35 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 36 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 37 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 38 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 40 of player with anvil named "&c&lUDGANG" with lore "||&7Tryk for at forlade vagt menuen!" to close
        format slot 42 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 43 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 44 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]

command /vagtkits:
    permission: vagt
    trigger:
        wait 3 ticks
        open chest with 5 rows named "&4&lVAGT KITS" to player
        format slot 0 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 1 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 2 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 6 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 7 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 8 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 9 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 17 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 13 of player with nether star named "&c&lVAGT KITS" with lore "||&7Her kan du tage:||&cVagt Kits!" to close then run [make player execute command "/vagt"]
        format slot 20 of player with golden helmet named "&3&lVAGT" with lore "||&7Tryk for at tage kittet &3&lVAGT" to close then run [make player execute command "/vagtkit1"]
        format slot 22 of player with Chain helmet named "&3&lOFFICER" with lore "||&7Tryk for at tage kittet &3&lOFFICER" to close then run [make player execute command "/vagtkit2"]
        format slot 24 of player with diamond helmet named "&3&lINSPEKTØR" with lore "||&7Tryk for at tage kittet &3&lINSPEKTØR" to close then run [make player execute command "/vagtkit3"]
        format slot 27 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 35 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 36 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 37 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 38 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 40 of player with anvil named "&c&lUDGANG" with lore "||&7Tryk for at forlade vagt menuen!" to close
        format slot 42 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 43 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        format slot 44 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]



command /vagtkit1:
    permission: vagt
    trigger:
        wait 2 ticks
        give player 1 iron sword of sharpness 4 and unbreaking 3 named "&3&lVAGT &f&lSVÆRD" with lore "||&3Vagt: &f%player%"
        give player 1 feather of knockback 2 named "&3&lVAGT &f&lFJER" with lore "||&3Vagt: &f%player%"
        give player 1 bow of power 4 and unbreaking 3 named "&3&lVAGT &f&lBUE" with lore "||&3Vagt: &f%player%"
        give player 1 golden helmet of protection 4 and unbreaking 3 named "&3&lVAGT &f&lHJELM" with lore "||&3Vagt: &f%player%"
        give player 1 iron chestplate of protection 4 and unbreaking 3 named "&3&lVAGT &f&lBRYSTPLADE" with lore "||&3Vagt: &f%player%"
        give player 1 iron leggings of protection 4 and unbreaking 3 named "&3&lVAGT &f&lBUKSER" with lore "||&3Vagt: &f%player%"
        give player 1 iron boots of protection 4 and unbreaking 3 named "&3&lVAGT &f&lSKO" with lore "||&3Vagt: &f%player%"
        give player 64 arrows named "&3&lVAGT &f&lPILE" with lore "||&3Vagt: &f%player%"
        give player 64 baked potato named "&3&lVAGT &f&lMAD" with lore "||&3Vagt: &f%player%"


command /vagtkit2:
    permission: vagt
    trigger:
        if player has permission "officer":
            wait 2 ticks
            give player 1 iron sword of sharpness 4 and unbreaking 3 named "&3&lVAGT &f&lSVÆRD" with lore "||&3Vagt: &f%player%"
            give player 1 feather of knockback 2 named "&3&lVAGT &f&lFJER" with lore "||&3Vagt: &f%player%"
            give player 1 bow of power 4 and unbreaking 3 named "&3&lVAGT &f&lBUE" with lore "||&3Vagt: &f%player%"
            give player 1 chain helmet of protection 4 and unbreaking 3 named "&3&lVAGT &f&lHJELM" with lore "||&3Vagt: &f%player%"
            give player 1 iron chestplate of protection 4 and unbreaking 3 named "&3&lVAGT &f&lBRYSTPLADE" with lore "||&3Vagt: &f%player%"
            give player 1 iron leggings of protection 4 and unbreaking 3 named "&3&lVAGT &f&lBUKSER" with lore "||&3Vagt: &f%player%"
            give player 1 iron boots of protection 4 and unbreaking 3 named "&3&lVAGT &f&lSKO" with lore "||&3Vagt: &f%player%"
            give player 64 arrows named "&3&lVAGT &f&lPILE" with lore "||&3Vagt: &f%player%"
            give player 64 baked potato named "&3&lVAGT &f&lMAD" with lore "||&3Vagt: &f%player%"
        else:
            send "&6&lVAGT &8| &f Du skal lige blive officer!"


command /vagtkit3:
    permission: vagt
    trigger:
        if player has permission "inspektør":
            wait 2 ticks
            give player 1 iron sword of sharpness 4 and unbreaking 3 named "&3&lVAGT &f&lSVÆRD" with lore "||&3Vagt: &f%player%"
            give player 1 feather of knockback 2 named "&3&lVAGT &f&lFJER" with lore "||&3Vagt: &f%player%"
            give player 1 bow of power 4 and unbreaking 3 named "&3&lVAGT &f&lBUE" with lore "||&3Vagt: &f%player%"
            give player 1 diamond helmet of protection 4 and unbreaking 3 named "&3&lVAGT &f&lHJELM" with lore "||&3Vagt: &f%player%"
            give player 1 iron chestplate of protection 4 and unbreaking 3 named "&3&lVAGT &f&lBRYSTPLADE" with lore "||&3Vagt: &f%player%"
            give player 1 iron leggings of protection 4 and unbreaking 3 named "&3&lVAGT &f&lBUKSER" with lore "||&3Vagt: &f%player%"
            give player 1 iron boots of protection 4 and unbreaking 3 named "&3&lVAGT &f&lSKO" with lore "||&3Vagt: &f%player%"
            give player 64 arrows named "&3&lVAGT &f&lPILE" with lore "||&3Vagt: &f%player%"
            give player 64 baked potato named "&3&lVAGT &f&lMAD" with lore "||&3Vagt: &f%player%"
        else:
            send "&6&lVAGT &8| &f Du skal lige blive inspektør!"









command /regler:
    trigger:
        send "&8[&c1&8]&7 Ingen form for hack!"
        send "&8[&c2&8]&7 Ingen form for plageri"
        send "&8[&c3&8]&7 Ingen form for spam"
        send "&8[&c4&8]&7 Ingen form for anklageri"
        send "&8[&c5&8]&7 ingen form for grimt sprog"
        send "&8[&c6&8]&7 Det er ikke tilladt at videregive personlige oplysninger."
        send "&8[&c7&8]&7 Det er ikke tilladt at sende stødende indhold/racisme/links."
        send "&8[&c8&8]&7 Det er ikke tilladt at reklamere for servere eller lignende"
        send "&8[&c9&8]&7 Det er ikke tilladt at bruge soundboard eller lignende."
        send "&8[&c10&8]&7 Staff har altid ret"



command /vagtregler:
    permission: vagt
    trigger:
        send "&8[&c1&8]&7 Ingen former for Abuse er tilladt."
        send "&8[&c2&8]&7 Som vagt må du Ikke gå ind i fangers celler. (Denne regel gælder ikke for Officer+)"
        send "&8[&c3&8]&7 Hvis du er i PvP, så må du kun løbe ind i Vagtområder    og ikke NoPvP"
        send "&8[&c4&8]&7 Det er Ikke tilladt at slå fangere uden grund!"
        send "&8[&c5&8]&7 Vi forlanger, at du er aktiv på serveren, ellers skal du forvente demote. (Du skal selvfølgelig ikke presse dig selv til at være aktiv)"
        send "&8[&c6&8]&7 Du må Ikke tage buffs i PvP, men kun i vagtstuen og vagttårnet"
        send "&8[&c7&8]&7 Det er ikke tilladt at forfølge / stalke spillere og deres celler."
        send "&8[&c8&8]&7 Det er Ikke tilladt at mine som vagt"
        send "&8[&c9&8]&7 Udnyttelse af bugs, vil medføre en straf"
        send "&8[&c10&8]&7 Vi forlanger, at du kan opføre dig ordenligt både over for vagterne og andre spillere"
        send "&8[&c11&8]&7 Det er Kun tilladt at leje Vagtceller, som befinder sig i Vagtstuen!"
        send "&8[&c12&8]&7 Du må Ikke stå AFK (Kun i Vagtstuen)"
        send "&8[&c13&8]&7 Det er kun tilladt at gå ned i BM hvis i er mindst 2 vagter der går derned"
        send "&8[&c14&8]&7 Det skal siges, at økser er tilladt i minen"
        send "&8[&c15&8]&7 Du Skal hedde dit ingame navn på discorden!"
        send "&8[&c16&8]&7 Du Skal sidde på discorden, mens du spiller som vagt!"
        send "&8[&c17&8]&7 Det er ikke tilladt at droppe items til fangerne."
        
command /vagtreset [<player>]:
    permission: *
    trigger:
        if arg-1 is set:
            if arg-1 has permission "vagt":
                set {brød.%arg-1%} to 0
                set {fangedrab.%arg-1%} to 0
                set {vagtdød.%arg-1%} to 0
                set {sword.%arg-1%} to 0
                send "&a&lDONE"
            else:
                send "&7[&4Fejl&7]: &cDenne spiller er ikke Vagt"
        else:
            send "&7[&4Fejl&7]: &cDu mangler at vælge en spiller &e/vagtreset [<navn>]"
            
command /vagtshop [<text>]:
    permission: vagt
    trigger:
        if arg-1 is not set:
            wait 3 ticks
            open chest with 5 rows named "&c&lVAGT SHOP" to player
            format slot 0 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 1 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 2 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 6 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 7 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 8 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 9 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 17 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 4 of player with nether star named "&c&lVAGT KITS" with lore "||&7Her kan du tage:||&cVagt Kits!" to close then run [execute player command "/vagt"]
            format slot 11 of player with iron sword named "&8[&cC-Vagt&8] &cSværd" with lore "&7Klik for at købe et &8[&cC-Vagt&8] &cSværd||||&7Pris: &a500$" to close then run [execute player command "/vagtshop sværd"]
            format slot 13 of player with 64 arrow named "&f&lPILE" with lore "&7Klik for at købe 64 &fPile||||&7Pris: &a100$" to close then run [execute player command "/vagtshop pile"]
            format slot 15 of player with bow named "&8[&cC-Vagt&8] &cBue" with lore "&7Klik for at købe en &8[&cC-Vagt&8] &cBue||||&7Pris: &a500$" to close then run [execute player command "/vagtshop bue"]
            format slot 19 of player with golden helmet named "&8[&cC-Vagt&8] &cHjelm" with lore "&7Klik for at købe en &8[&cC-Vagt&8] &cHjelm||||&7Pris: &a250$" to close then run [execute player command "/vagtshop hjelm"]
            format slot 21 of player with iron chestplate named "&8[&cC-Vagt&8] &cBrystplade" with lore "&7Klik for at købe en &8[&cC-Vagt&8] &cBrystplade||||&7Pris: &a750$" to close then run [execute player command "/vagtshop brystplade"]
            format slot 23 of player with iron leggings named "&8[&cC-Vagt&8] &cBukser" with lore "&7Klik for at købe et par &8[&cC-Vagt&8] &cBukser||||&7Pris: &a500$" to close then run [execute player command "/vagtshop bukser"]
            format slot 25 of player with iron boots named "&8[&cC-Vagt&8] &cSko" with lore "&7Klik for at købe et par &8[&cC-Vagt&8] &cSko||||&7Pris: &a350$" to close then run [execute player command "/vagtshop sko"]
            format slot 31 of player with 64 grilled pork named "&8&lMAD" with lore "&7Klik for at købe &8Mad||||&7Pris: &a100$" to close then run [execute player command "/vagtshop mad"]
            format slot 27 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 35 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 36 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 37 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 38 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 40 of player with anvil named "&c&lUDGANG" with lore "||&7Tryk for at forlade vagt menuen!" to close
            format slot 42 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 43 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 44 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        else if arg-1 is "sværd":
            if player's balance is more or equal to 500:
                remove 500 from player's balance
                add 1 iron sword named "&8[&cC-Vagt&8] &cSværd" with lore "&eKøbt af: &f%player%" to player's inventory
                send "&6&lVAGT &8| &7Du købte et jern sværd"
            else:
                send "&6&lVAGT &8| &cDu har ikke nok penge."
        
        else if arg-1 is "pile":
            if player's balance is more or equal to 100:
                remove 100 from player's balance
                add 64 arrow named "&f&lPILE" to player's inventory
                send "&6&lVAGT &8| &7Du købte 64 pile"
            else:
                send "&6&lVAGT &8| &cDu har ikke nok penge."
                
        else if arg-1 is "bue":
            if player's balance is more or equal to 500:
                remove 500 from player's balance
                add 1 bow named "&8[&cC-Vagt&8] &cBue" with lore "&eKøbt af: &f%player%" to player's inventory
                send "&6&lVAGT &8| &7Du købte 1 bue"
            else:
                send "&6&lVAGT &8| &cDu har ikke nok penge."
        
        else if arg-1 is "hjelm":
            if player's balance is more or equal to 250:
                remove 250 from player's balance
                add 1 golden helmet named "&8[&cC-Vagt&8] &cHjelm" with lore "&eKøbt af: &f%player%" to player's inventory
                send "&6&lVAGT &8| &7Du købte 1 Hjelm"
            else:
                send "&6&lVAGT &8| &cDu har ikke nok penge."
                
        else if arg-1 is "brystplade":
            if player's balance is more or equal to 750:
                remove 750 from player's balance
                add 1 iron chestplate named "&8[&cC-Vagt&8] &cBrystplade" with lore "&eKøbt af: &f%player%" to player's inventory
                send "&6&lVAGT &8| &7Du købte 1 brystplade"
            else:
                send "&6&lVAGT &8| &cDu har ikke nok penge."
                
        else if arg-1 is "bukser":
            if player's balance is more or equal to 500:
                remove 500 from player's balance
                add 1 iron leggings named "&8[&cC-Vagt&8] &cBukser" with lore "&eKøbt af: &f%player%" to player's inventory
                send "&6&lVAGT &8| &7Du købte 1 bukser"
            else:
                send "&6&lVAGT &8| &cDu har ikke nok penge."
                
        else if arg-1 is "sko":
            if player's balance is more or equal to 350:
                remove 350 from player's balance
                add 1 iron boots named "&8[&cC-Vagt&8] &cSko" with lore "&eKøbt af: &f%player%" to player's inventory
                send "&6&lVAGT &8| &7Du købte 1 sko"
            else:
                send "&6&lVAGT &8| &cDu har ikke nok penge."
                
        else if arg-1 is "mad":
            if player's balance is more or equal to 100:
                remove 100 from player's balance
                add 64 grilled pork named "&8&lMAD" to player's inventory
                send "&6&lVAGT &8| &7Du købte 64 Vagt mad"
            else:
                send "&6&lVAGT &8| &cDu har ikke nok penge."
        
command /vagtupgrade [<text>] [<text>]:
    permission: vagt
    trigger:
        if arg-1 is not set:
            wait 3 ticks
            open chest with 5 rows named "&c&lVAGT UPGRADE" to player
            format slot 0 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 1 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 2 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 6 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 7 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 8 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 9 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 17 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 4 of player with nether star named "&c&lVAGT KITS" with lore "||&7Her kan du tage:||&cVagt Kits!" to close then run [execute player command "/vagt"]
            format slot 11 of player with iron sword named "&8[&cC-Vagt&8] &cSværd" with lore "&7Klik for Upgradere" to close then run [execute player command "/vagtupgrade sværd"]
            format slot 15 of player with bow named "&8[&cC-Vagt&8] &cBue" with lore "&7Klik for Upgradere" to close then run [execute player command "/vagtupgrade bue"]
            format slot 19 of player with golden helmet named "&8[&cC-Vagt&8] &cHjelm" with lore "&7Klik for Upgradere" to close then run [execute player command "/vagtupgrade hjelm"]
            format slot 21 of player with iron chestplate named "&8[&cC-Vagt&8] &cBrystplade" with lore "&7Klik for Upgradere" to close then run [execute player command "/vagtupgrade brystplade"]
            format slot 23 of player with iron leggings named "&8[&cC-Vagt&8] &cBukser" with lore "&7Klik for Upgradere" to close then run [execute player command "/vagtupgrade bukser"]
            format slot 25 of player with iron boots named "&8[&cC-Vagt&8] &cSko" with lore "&7Klik for Upgrader" to close then run [execute player command "/vagtupgrade sko"]
            format slot 27 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 35 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 36 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 37 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 38 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 40 of player with anvil named "&c&lUDGANG" with lore "||&7Tryk for at forlade vagt menuen!" to close
            format slot 42 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 43 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            format slot 44 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
        else if arg-1 is "sværd":
            if arg-2 is not set:
                wait 3 ticks
                open chest with 5 rows named "&c&lVAGT UPGRADE - SVÆRD" to player
                format slot 0 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 1 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 2 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 6 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 7 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 8 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 9 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 17 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 21 of player with shiny iron sword named "&a&lSHARPNESS" with lore "&7Klik for Upgradere" to close then run [execute player command "/vagtupgrade sværd sharpness"]
                format slot 23 of player with shiny iron sword named "&a&lUNBREAKING" with lore "&7Klik for Upgradere" to close then run [execute player command "/vagtupgrade sværd unbreaking"]
                format slot 27 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 35 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 36 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 37 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 38 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 40 of player with anvil named "&c&lUDGANG" with lore "||&7Tryk for at forlade vagt menuen!" to close
                format slot 42 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 43 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 44 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
            else if arg-2 is "sharpness":
                wait 3 ticks
                open chest with 5 rows named "&c&lVAGT UPGRADE - SVÆRD" to player
                format slot 0 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 1 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 2 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 6 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 7 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 8 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 9 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 17 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 20 of player with shiny iron sword named "&a&lSHARPNESS 1" with lore "&7Klik for Upgradere||||&7Pris: &a500$" to close then run [execute player command "/vus1"]
                format slot 22 of player with shiny iron sword named "&a&lSHARPNESS 2" with lore "&7Klik for Upgradere||||&7Pris: &a1000$" to close then run [execute player command "/vus2"]
                format slot 24 of player with shiny iron sword named "&a&lSHARPNESS 3" with lore "&7Klik for Upgradere||||&7Pris: &a1500$" to close then run [execute player command "/vus3"]
                format slot 27 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 35 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 36 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 37 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 38 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 40 of player with anvil named "&c&lUDGANG" with lore "||&7Tryk for at forlade vagt menuen!" to close
                format slot 42 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 43 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
                format slot 44 of player with Red Stained Glass Pane to close then run [execute player command "/vagt"]
command /vus1:
    permission: vagt
    trigger:
        if player's balance is more or equal to 500:
            loop all items in player's inventory:
                if loop-item is iron sword named "&8[&cC-Vagt&8] &cSværd" with lore "&eKøbt af: &f%player%":
                    enchant loop-item with sharpness 1
                    remove 500 from player's balance
                    send "&6&lVAGT &8| &7Du enchantede dit vagt sværd"
                else:
                    send "&6&lVAGT &8| &cDu har ikke et vagt sværd i din inventory."
        else:
            send "&6&lVAGT &8| &cDu har ikke nok penge."
command /vus2:
    permission: vagt
    trigger:
        if player's balance is more or equal to 1000:
            loop all items in player's inventory:
                if loop-item is iron sword named "&8[&cC-Vagt&8] &cSværd" with lore "&eKøbt af: &f%player%":
                    if level of sharpness of loop-item is 1:
                        enchant loop-item with sharpness 2
                        remove 1000 from player's balance
                        send "&6&lVAGT &8| &7Du enchantede dit vagt sværd"
                    else:
                        send: "&6&lVAGT &8| &cDit vagt sværd skal have sharpness 1"
                else:
                    send "&6&lVAGT &8| &cDu har ikke et vagt sværd i din inventory."
        else:
            send "&6&lVAGT &8| &cDu har ikke nok penge."

And I get this error in mc when reloading the skript:
73886155-5438dc80-4869-11ea-844d-b95a141e6f26.png
 
Status
Not open for further replies.