Solved Failed to give player an enchanted item

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

Kolombooo

Active Member
Dec 3, 2020
51
3
8
Code
Code:
command /si-axe1 <player>:
  permission: si.admin
  permission message: &7[&6&lCoud&e&lMC&7] &8Na toto nemáš oprávnění
  trigger:
    give arg-1 diamond axe of unbreaking 10 and efficiency 8 and sharpness 5 and mending

Error code
[08:30:14 ERROR]: ('diamond axe of unbreaking 10', 'efficiency 8', 'sharpness 5' and 'mending') can't be added to a player because the former is neither an item type, an inventory nor an experience point (specialitems.sk, line 23: give arg-1 diamond axe of unbreaking 10 and efficiency 8 and sharpness 5 and mending')
 
Code
Code:
command /si-axe1 <player>:
  permission: si.admin
  permission message: &7[&6&lCoud&e&lMC&7] &8Na toto nemáš oprávnění
  trigger:
    give arg-1 diamond axe of unbreaking 10 and efficiency 8 and sharpness 5 and mending

Error code
I do not recommend that you add the entire item on one line. Instead, do this:

code_language.skript:
command /give:
   trigger
       set {_axe} to diamond axe
       enchant {_axe} with unbreaking 10
       enchant {_axe} with efficiency 8
       enchant {_axe} with sharpness 5
       enchant {_axe} with mending
       give {_axe} to player
 
I do not recommend that you add the entire item on one line. Instead, do this:

code_language.skript:
command /give:
   trigger
       set {_axe} to diamond axe
       enchant {_axe} with unbreaking 10
       enchant {_axe} with efficiency 8
       enchant {_axe} with sharpness 5
       enchant {_axe} with mending
       give {_axe} to player

Still does not work
Error code:
[10:36:54 ERROR]: Can't understand this expression: 'diamond axe' (specialitems.sk, line 23: set {_axe} to diamond axe')
 
That's weird.

Try setting a name to the axe
code_language.skript:
set {_axe} to diamond axe named "&4Powered axe" #for example.
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"')
 
Still does not work
Error code:
I tested it myself and it works fine. Btw you just messed up the skript, here is the correct one:
Code:
command /test:
    trigger:
        set {_axe} to diamond axe
        enchant {_axe} with unbreaking 10
        enchant {_axe} with efficiency 8
        enchant {_axe} with sharpness 5
        enchant {_axe} with mending
        give {_axe} to player
You only messed up some ":" and some spaces... What version of skript are you using? And what are your addons?
 
Status
Not open for further replies.