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

Solved Failed to give player an enchanted item

Discussion in 'Skript' started by Kolombooo, Mar 22, 2021.

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

    Kolombooo Active Member

    Joined:
    Dec 3, 2020
    Messages:
    51
    Likes Received:
    3
    Code
    Code (Text):
    1. command /si-axe1 <player>:
    2.   permission: si.admin
    3.   permission message: &7[&6&lCoud&e&lMC&7] &8Na toto nemáš oprávnění
    4.   trigger:
    5.     give arg-1 diamond axe of unbreaking 10 and efficiency 8 and sharpness 5 and mending
    Error code
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    I do not recommend that you add the entire item on one line. Instead, do this:

    Code (Skript):
    1. command /give:
    2.    trigger
    3.        set {_axe} to diamond axe
    4.        enchant {_axe} with unbreaking 10
    5.        enchant {_axe} with efficiency 8
    6.        enchant {_axe} with sharpness 5
    7.        enchant {_axe} with mending
    8.        give {_axe} to player
     
  3. Kolombooo

    Kolombooo Active Member

    Joined:
    Dec 3, 2020
    Messages:
    51
    Likes Received:
    3
    Still does not work
    Error code:
     
  4. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    That's weird.

    Try setting a name to the axe
    Code (Skript):
    1. set {_axe} to diamond axe named "&4Powered axe" #for example.
     
  5. Kolombooo

    Kolombooo Active Member

    Joined:
    Dec 3, 2020
    Messages:
    51
    Likes Received:
    3
    Still not working
    Can't understand this expression: 'diamond axe named "&4Powered axe"' (specialitems.sk, line 23: set {_axe} to diamond axe named "&4Powered axe"')
     
  6. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    I tested it myself and it works fine. Btw you just messed up the skript, here is the correct one:
    Code (Text):
    1. command /test:
    2.     trigger:
    3.         set {_axe} to diamond axe
    4.         enchant {_axe} with unbreaking 10
    5.         enchant {_axe} with efficiency 8
    6.         enchant {_axe} with sharpness 5
    7.         enchant {_axe} with mending
    8.         give {_axe} to player
    You only messed up some ":" and some spaces... What version of skript are you using? And what are your addons?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...