#Loop error

1 messages · Page 1 of 1 (latest)

boreal kettle
#

Yo wsp!
i am making a inventory for pets and when i try to add a pet it says a error and i dont know why it shows up

command /inventory:
    trigger:
        inventory(player, 0)

function inventory(p: player, page: number):
    set {_gui} to a new chest inventory with 6 rows named "&aɪɴᴠᴇɴᴛᴏʀʏ"
    set slot (integers from 0 to 9) of {_gui} to black stained glass pane named " "
    set slot (17 , 18 , 26 , 27 , 35 , 36) of {_gui} to black stained glass pane named " "
    set slot (integers from 44 to 54) of {_gui} to black stained glass pane named " "
    set {_s} to 10
    loop {%{_p}'s uuid%::petname::*}:
        set {_a} to loop-value
        if {_s} is not 17 or 26 or 35:
            set slot {_s} of {_gui} to loop-value's skull named "&7ᴘʟᴀʏᴇʀ:&e %loop-value%" with lore "&7ʀᴀɴᴋ: %{_p}'s prefix%"
    open {_gui} to {_p}

if i remove the lore then it works else it just gives me an error

open dune
#

is the loop-value a player?

#

cause otherwise you can't get the loop-value's skull

boreal kettle
#

the lore causes the error

#

not the skull

open dune
#

why not use {_a} if you set that up

boreal kettle
#

{_a} doesn't work

open dune
#

is it null?

boreal kettle
#

it does work but it does the same as {_p}

#

it shows the same error

open dune
#

broadcast the loop-value

boreal kettle
#

didn't work 😭

#

did i do it right or nah?

open dune
#

What does the broadcast output

boreal kettle
#

Nvm fixed it!