I made this simple-ish skript to add a rarity (lore) to an item based on an argument but when I reload the skript it gives me "A tab completer cannot be assigned before the command is defined".
Also the command "/setrarity" won't register and cannot be used.
Also the command "/setrarity" won't register and cannot be used.
Code:
command /setrarity <text>:
trigger:
if arg-1 is equal to "basic":
add "%nl%&7&lBASIC" to lore of player's held item
else if arg-1 is equal to "common":
add "%nl%&f&lCOMMON" to lore of player's held item
else if arg-1 is equal to "uncommon":
add "%nl%&a&lUNCOMMON" to lore of player's held item
else if arg-1 is equal to "rare":
add "%nl%&9&lRARE" to lore of player's held item
else if arg-1 is equal to "legendary":
add "%nl%&6&lLEGENDARY" to lore of player's held item
else if arg-1 is equal to "divine":
add "%nl%&d&ki &d&lDIVINE &d&ki" to lore of player's held item
else if arg-1 is equal to "admin":
add "%nl%&c&l&k_ &c&lADMIN &c&l&k_" to lore of player's held item
else if arg-1 is equal to "limited":
add "%nl%&3&ki &3&lLIMITED &3&ki" to lore of player's held item
on tab completer for "/setrarity":
argument at 2 is not set:
add "basic" to completions
add "common" to completions
add "uncommon" to completions
add "rare" to completions
add "legendary" to completions
add "divine" to completions
add "admin" to completions
add "limited" to completions