I am making a skript so I can quickly make items, but I am getting an error at the 'enchant player's tool with efficiency {_eAmount}', how come?
Code:
command /createitem [<text>] [<text>] [<number>] [<number>]:
aliases: /createi, /citem
permission: op
trigger:
if arg-1 is "help":
send "&eUsage: /createitem <type> <name> <enchant1> <enchant2>"
send "&7Types: pick, sword, armor"
send "&7Example: /createitem pick &bEpicPickaxe 5 3"
else if arg-1 is "pick":
if player's tool is a pickaxe:
if arg-2 is set:
if arg-3 is set:
if arg-4 is set:
set {_eAmount} to arg-3
set {_foAmount} to arg-4
set name of player's tool to colored arg-2
wait 3 ticks
enchant player's tool with efficiency {_eAmount}
enchant player's tool with fortune {_foAmount}
wait 3 ticks
make player execute command "/ie hide enchants"
wait 3 ticks
make player execute command "/ie attribute add flying_speed 2"
wait 3 ticks
make player execute command "/ie hide attributes"
wait 3 ticks
make player execute command "/ie unbreakable"
wait 3 ticks
make player execute command "/ie hide unbreakable"
wait 3 ticks
add "FFF⛏ &f&lEfficiency: &a+%{eAmount}%" to lore of player's tool
wait 3 ticks
add "&a &f&lFortune: &a+%{foAmount}%" to lore of player's tool
wait 3 ticks
add "&d &f&lTelekinesis" to lore of player's tool
wait 3 ticks
add "&c &f&lSmelt" to lore of player's tool
send "&eSuccessfully added all enchantments to your pickaxe!"
else:
send "&cIncorrect format, please do /citem help for more information."