looping error

  • Thread starter Deleted member 9590
  • Start date
  • 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 comminuty!

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

Deleted member 9590

Skript Version:2.5-alpha2
Minecraft Version: Paper version git-Paper-1618 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)
---
Code:

Code:
on inventory click:       
    if name of player's current inventory is "{@gprefix} %{bb::%uuid of player%}% &a!":
        cancel event
        if clicked slot is 20:
            normalgui("{@gprefix} &aMedlemmer", player)
            set slot 40 of player's current inventory to red dye named "&4&lTilbage" with lore "{@lore1}", and "{@lore2} Klik her for at komme tilbage"
            loop {bb::%uuid of player%::pmedlemmer::*}:
                set {_slot1} to 10
                set {_slot2} to 19
                if {_slot1} isn't more than 16:
                    if size of {bb::%uuid of player%::pmedlemmer::*} isn't more than {_slot1}:
                        set {bb::%uuid of player%::%{_slot1}%} to loop-value
                        add 1 to {_slot1}
                        if loop-value is player:
                            set slot {_slot1} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at ændre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7Dig&8)"
                        else:
                            set slot {_slot1} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at ændre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7%loop-value%&8)"
                else:
                    if {_slot2} is not more than 25:
                        if size of {bb::%uuid of player%::pmedlemmer::*} isn't more than {_slot2}:
                            set {bb::%uuid of player%::%{_slot1}%} to loop-value
                            add 1 to {_slot1}
                            if loop-value is player:
                                set slot {_slot2} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at ændre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7Dig&8)"
                            else:
                                set slot {_slot2} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at ændre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7%loop-value%&8)"

Errors:
Code:
07.05 13:18:14 [Server] ERROR There's no loop that matches 'loop-value's skull named "&e&l%loop-value%" "&8&l&m------------", and "&8? &7 Klik her for at dre &c%loop-value%", and "&8&l&m------------", and "&dPerson:", and "&8(&7Dig&8)"' (bande.sk, line 125: set slot {_slot1} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at dre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7Dig&8)"')
07.05 13:18:14 [Server] ERROR There's no loop that matches 'loop-value's skull named "&e&l%loop-value%" "&8&l&m------------", and "&8? &7 Klik her for at dre &c%loop-value%", and "&8&l&m------------", and "&dPerson:", and "&8(&7%loop-value%&8)"' (bande.sk, line 127: set slot {_slot1} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at dre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7%loop-value%&8)"')
07.05 13:18:14 [Server] ERROR There's no loop that matches 'loop-value's skull named "&e&l%loop-value%" "&8&l&m------------", and "&8? &7 Klik her for at dre &c%loop-value%", and "&8&l&m------------", and "&dPerson:", and "&8(&7Dig&8)"' (bande.sk, line 134: set slot {_slot2} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at dre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7Dig&8)"')
07.05 13:18:15 [Server] ERROR There's no loop that matches 'loop-value's skull named "&e&l%loop-value%" "&8&l&m------------", and "&8? &7 Klik her for at dre &c%loop-value%", and "&8&l&m------------", and "&dPerson:", and "&8(&7%loop-value%&8)"' (bande.sk, line 136: set slot {_slot2} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at dre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7%loop-value%&8)"')
07.05 13:18:15 [Server] INFO Encountered 4 errors while reloading bande.sk!

It saying there's no loop that matches confuses me a lot, as I endeed are looping a list variable just above...
 
Skript Version:2.5-alpha2
Minecraft Version: Paper version git-Paper-1618 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)
---
Code:

Code:
on inventory click:      
    if name of player's current inventory is "{@gprefix} %{bb::%uuid of player%}% &a!":
        cancel event
        if clicked slot is 20:
            normalgui("{@gprefix} &aMedlemmer", player)
            set slot 40 of player's current inventory to red dye named "&4&lTilbage" with lore "{@lore1}", and "{@lore2} Klik her for at komme tilbage"
            loop {bb::%uuid of player%::pmedlemmer::*}:
                set {_slot1} to 10
                set {_slot2} to 19
                if {_slot1} isn't more than 16:
                    if size of {bb::%uuid of player%::pmedlemmer::*} isn't more than {_slot1}:
                        set {bb::%uuid of player%::%{_slot1}%} to loop-value
                        add 1 to {_slot1}
                        if loop-value is player:
                            set slot {_slot1} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at ændre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7Dig&8)"
                        else:
                            set slot {_slot1} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at ændre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7%loop-value%&8)"
                else:
                    if {_slot2} is not more than 25:
                        if size of {bb::%uuid of player%::pmedlemmer::*} isn't more than {_slot2}:
                            set {bb::%uuid of player%::%{_slot1}%} to loop-value
                            add 1 to {_slot1}
                            if loop-value is player:
                                set slot {_slot2} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at ændre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7Dig&8)"
                            else:
                                set slot {_slot2} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at ændre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7%loop-value%&8)"

Errors:
Code:
07.05 13:18:14 [Server] ERROR There's no loop that matches 'loop-value's skull named "&e&l%loop-value%" "&8&l&m------------", and "&8? &7 Klik her for at dre &c%loop-value%", and "&8&l&m------------", and "&dPerson:", and "&8(&7Dig&8)"' (bande.sk, line 125: set slot {_slot1} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at dre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7Dig&8)"')
07.05 13:18:14 [Server] ERROR There's no loop that matches 'loop-value's skull named "&e&l%loop-value%" "&8&l&m------------", and "&8? &7 Klik her for at dre &c%loop-value%", and "&8&l&m------------", and "&dPerson:", and "&8(&7%loop-value%&8)"' (bande.sk, line 127: set slot {_slot1} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at dre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7%loop-value%&8)"')
07.05 13:18:14 [Server] ERROR There's no loop that matches 'loop-value's skull named "&e&l%loop-value%" "&8&l&m------------", and "&8? &7 Klik her for at dre &c%loop-value%", and "&8&l&m------------", and "&dPerson:", and "&8(&7Dig&8)"' (bande.sk, line 134: set slot {_slot2} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at dre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7Dig&8)"')
07.05 13:18:15 [Server] ERROR There's no loop that matches 'loop-value's skull named "&e&l%loop-value%" "&8&l&m------------", and "&8? &7 Klik her for at dre &c%loop-value%", and "&8&l&m------------", and "&dPerson:", and "&8(&7%loop-value%&8)"' (bande.sk, line 136: set slot {_slot2} of player's current inventory to loop-value's skull named "&e&l%loop-value%" "{@lore1}", and "{@lore2} Klik her for at dre &c%loop-value%", and "{@lore1}", and "&dPerson:", and "&8(&7%loop-value%&8)"')
07.05 13:18:15 [Server] INFO Encountered 4 errors while reloading bande.sk!

It saying there's no loop that matches confuses me a lot, as I endeed are looping a list variable just above...
You forgot `with lore`
 
You forgot `with lore`
Damn im blind again, thanks xd

Can you then maybe help me with this. The code is supossed to fill out the 2 first emtpy rows with player skulls from the looped variable, but nothing happens
upload_2020-5-7_13-53-34.png
 
Status
Not open for further replies.