1. 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!


    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enchantment level through variable.

Discussion in 'Skript' started by lucasmooon, Feb 10, 2019.

Thread Status:
Not open for further replies.
  1. lucasmooon

    lucasmooon Member

    Feb 4, 2017
    Likes Received:
    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 (Text):
    1. 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 (Text):
    1. enchant player's tool with "bane of arthropods %{_lvl}%" parsed as enchantment type
    #1 lucasmooon, Feb 10, 2019
    Last edited: Feb 10, 2019
    • Informative Informative x 1
Thread Status:
Not open for further replies.

Share This Page