Hello everyone! I need help by saving Variables per item. This is my code:
How can I fix this? I don’t think using a list will help, but I’m open to suggestions if I’m wrong!
What happens is that when I have two or more armor sets, the level of the first set gets replaced by the second. In other words, the variable only holds one value for all items.Code:#ARMOR command /armor <number>: trigger: clear {armor} set {armor} to unbreakable leather chestplate with name "&eLeather Set" with lore "&eLevel: &c%arg-1% %newline%%newline%&a&lCOMMON" set slot 1 of player's inventory to {armor} set {_item} to item in slot 1 of player's inventory set {level.%{_item}%} to arg-1 command /checklevel: trigger: set {_item} to player's tool broadcast "Level: %{level.%{_item}%}%"
How can I fix this? I don’t think using a list will help, but I’m open to suggestions if I’m wrong!