So I have this code right here that has one error, but I can't find it.
Can someone explain ?
Code:
on chest interact:
if name of event-block is "&6&lCollector":
set {_chest} to event-block
set {_inv} to inventory of {_chest}
set {_balance} to balance of player
set {_totalWorth} to 0
loop 53 times:
set {_item} to item from {_inv} at slot loop-number
if {_item} is not air:
if worth of {_item} is set:
set {_value} to worth of {_item}
set {_num} to {_item}'s amount
remove {_num} {_item} from {_inv}
set {_totalWorth} to {_totalWorth} + ({_value} * {_num})
set {_balance} to {_balance} + ({_value} * {_num})
send "&aSold %{_num}% x %{_item}% for %{_value}%."
set balance of player to {_balance}
send "&aTotal worth: %{_totalWorth}%."
command /chestgive:
permission: myplugin.chestgive
aliases: [givechest]
trigger:
give player a chest named "&6&lCollector"
send "&aYou have been given a &6&lCollector chest!"