Enchantment level through variable.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

lucasmooon

Member
Feb 4, 2017
16
0
0
23
Hello :emoji_slight_smile:

I'm using a function through a GUI to declare the level of an enchantment, but this variable can have a lot of different values (from 0 to 36) and I wouldn't be able to list every single enchantment on the code, therefore I have to use this code:

Code:
enchant {_p}'s tool with bane of arthropods {_level}

The problem is that Skript does not recognize or does not accept this variable in this position. What could I do?
{_level} is already parsed as number.

I got it:

Code:
enchant player's tool with "bane of arthropods %{_lvl}%" parsed as enchantment type
 
Last edited:
Status
Not open for further replies.