1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

looping error

Discussion in 'Skript' started by Deleted member 9590, May 7, 2020.

Thread Status:
Not open for further replies.
  1. 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 (Text):
    1. on inventory click:      
    2.     if name of player's current inventory is "{@gprefix} %{bb::%uuid of player%}% &a!":
    3.         cancel event
    4.         if clicked slot is 20:
    5.             normalgui("{@gprefix} &aMedlemmer", player)
    6.             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"
    7.             loop {bb::%uuid of player%::pmedlemmer::*}:
    8.                 set {_slot1} to 10
    9.                 set {_slot2} to 19
    10.                 if {_slot1} isn't more than 16:
    11.                     if size of {bb::%uuid of player%::pmedlemmer::*} isn't more than {_slot1}:
    12.                         set {bb::%uuid of player%::%{_slot1}%} to loop-value
    13.                         add 1 to {_slot1}
    14.                         if loop-value is player:
    15.                             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)"
    16.                         else:
    17.                             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)"
    18.                 else:
    19.                     if {_slot2} is not more than 25:
    20.                         if size of {bb::%uuid of player%::pmedlemmer::*} isn't more than {_slot2}:
    21.                             set {bb::%uuid of player%::%{_slot1}%} to loop-value
    22.                             add 1 to {_slot1}
    23.                             if loop-value is player:
    24.                                 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)"
    25.                             else:
    26.                                 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 (Text):
    1. 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)"')
    2. 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)"')
    3. 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)"')
    4. 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)"')
    5. 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...
     
  2. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,500
    Likes Received:
    107
    Medals:
    You forgot `with lore`
     
  3. 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
     
Thread Status:
Not open for further replies.

Share This Page

Loading...