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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our 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.

Solved Enchanting Item with Separate Variable

Discussion in 'Skript' started by Mapzman, Aug 11, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. Mapzman

    Mapzman Member

    Joined:
    Mar 26, 2017
    Messages:
    11
    Likes Received:
    0
    Skript won't allow me to enchant an item if the enchant level is a separate variable, does anyone know a workaround?

    {sharpnessLevel.%loop-player%} is any integer over 0

    Code (Skript):
    1. if loop-item is a sword:
    2.     enchant loop-item with Sharpness {sharpnessLevel.%loop-player%}
     
  2. Best Answer:
    Post #2 by ShaneBee, Aug 11, 2017
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Try
    Code (Skript):
    1. enchant loop-item with "sharpness %{sharpnessLevel.%loop-player%}%" parsed as enchantment type
     
    • Like Like x 1
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Wow thanks it worked, I tried parsing it as an enchant type, but I must have typed it wrong
     
Thread Status:
Not open for further replies.
Loading...