Hey, I can't find out what the problem is? When I reloaded the script it says in the chat "The function "enchant" does not exist" Can someone tell me why?
Here is the code I use
Here is the code I use
code_language.skript:
on rightclick:
if player is holding a diamond sword:
enchant(player, "123")
function enchant(p:player, arg:text):
set {_uuid} to uuid of {_p}
if {_arg} is "123":
wait 1 tick
open chest with 6 rows named "&c&l SMED &e- {_p}" to {_p}
format slot 0 of {_p} with white glass named " " with lore "" to be unstealable
format slot 1 of {_p} with white glass named " " with lore "" to be unstealable
format slot 2 of {_p} with white glass named " " with lore "" to be unstealable
format slot 3 of {_p} with white glass named " " with lore "" to be unstealable
format slot 4 of {_p} with white glass named " " with lore "" to be unstealable
format slot 5 of {_p} with white glass named " " with lore "" to be unstealable
format slot 6 of {_p} with white glass named " " with lore "" to be unstealable
format slot 7 of {_p} with white glass named " " with lore "" to be unstealable
format slot 8 of {_p} with white glass named " " with lore "" to be unstealable
format slot 9 of {_p} with white glass named " " with lore "" to be unstealable
format slot 17 of {_p} with white glass named " " with lore "" to be unstealable
format slot 18 of {_p} with white glass named " " with lore "" to be unstealable
format slot 19 of {_p} with white glass named " " with lore "" to be unstealable
format slot 20 of {_p} with white glass named " " with lore "" to be unstealable
format slot 21 of {_p} with white glass named " " with lore "" to be unstealable
format slot 22 of {_p} with white glass named " " with lore "" to be unstealable
format slot 23 of {_p} with white glass named " " with lore "" to be unstealable
format slot 24 of {_p} with white glass named " " with lore "" to be unstealable
format slot 25 of {_p} with white glass named " " with lore "" to be unstealable
format slot 26 of {_p} with white glass named " " with lore "" to be unstealable