#enchant control inconsistency

1 messages · Page 1 of 1 (latest)

queen radish
#

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!
#

this works
set stored enchants of {_enchantedbook} to Feather Falling 2

but this does not even though the broadcast broadcasts the same thing
set stored enchants of {_enchantedbook} to {_enchantment}

if i do this it works but then i cannot set the enchantment level

Here is the code for all the variables in that loop since its hard to read through all the code:

  set {_enchantmentlevel} to loop-value
  set {_enchantment} to "%{_enchantmenttype}% %{_enchantmentlevel}%"
  broadcast {_enchantment}
  add 1 to {_slot}
  set {_enchantedbook} to enchanted book```
#

@copper oriole

queen radish
#

@steady sonnet idk your rules on pings but u think u could help me here?

candid gust
#

its still a string

#

you need to parse the whole thing

queen radish