#"Item" in a function

1 messages · Page 1 of 1 (latest)

dense dome
#
    set line 1 of lore of {_i} to "test text"
    
command /i-love-men:
    permission: debug.debug
    trigger:
        updateItem(player's held item)```

this code returns no errors, but if i run the command /i-love-men the lore of my held item won't update.
#

oh i almost forgot the plugins i use:
Skript (duh)
SkBee

calm quarry
#

hmmmmm

#

hmmmmmmm

dense dome
#

?

calm quarry
#

{_i} is just the exact same item as the one you're holding but skript wont update the one you're holding because of that

dense dome
#

oh my god im dumb

#

thanks

calm quarry
#

better to just do function updateItem(p: player): and set {_p}'s tool lore

dense dome
#

yea thats probably what i should do

calm quarry
#

or you can keep it the same and just have function updateItem(i:item) :: item: and set the player's tool

#

like set player's held item to updateItem(player's held item) would probably work

#

just return {_i} at the end of function