I am trying to make a custom enchant skript. I am currently making a list of enchantments which i intend to then apply to a diamond sword. However it gives an error.
Code:
Error:
https://gyazo.com/1a2833ec419a2d0b475c0a34cbabbd3b
Thanks. Expel.
Code:
Code:
function enchantedItem(i: item) :: item:
if {_i} is diamond sword:
chance of 50%:
add sharpness 10 to {_enchantments::*}
chance of 50%:
add flame 10 to {_enchantments::*}
chance of 50%:
add protection 10 to {_enchantments::*}
set {_item} to {_item} of {_enchantments::*}
return {_item}
set slot 25 of player's current inventory to enchantedItem(diamond sword)
Error:
https://gyazo.com/1a2833ec419a2d0b475c0a34cbabbd3b
Thanks. Expel.