I am trying to make a enchant limiter skript. Im working on the gui part right now but im running into the problem where when i manually put in Feather Falling 2 as the stored enchants of the enchanted book I am putting in the gui it shows it correctly as a feather falling 2 book but when I try using my loop to do the exact same thing and the broadcasted value of the loop-index and loop-value equal the same type of text i wrote in manually it does not work
aliases: /ec
permission: op
usage: "Usage: /enchantcontrol add <amount>"
trigger:
if arg-1 is set:
arg-1 is "add":
arg-2 is set:
arg-3 is set:
set {_enchantment} to arg-3
set {enchantcontrol::%arg-3%} to arg-2
broadcast {_enchantment}
else:
set metadata tag "enchantcontrol" of player to chest inventory with 6 rows named "&6&lEnchant&7 Control"
set {_acv} to -1
set {_slot} to -1
loop {enchantcontrol::*}:
set {_enchantmenttype} to loop-index parsed as enchantment
set {_enchantmentlevel} to loop-value
set {_enchantment} to "%{_enchantmenttype}% %{_enchantmentlevel}%"
broadcast {_enchantment}
add 1 to {_slot}
set {_enchantedbook} to enchanted book
set stored enchants of {_enchantedbook} to {_enchantment}
set slot {_slot} of metadata tag "enchantcontrol" of player to {_enchantedbook}
open (metadata tag "enchantcontrol" of player) to player```
Here is my code. No errors
help would be greatly appreciated!