Why don't work?

  • 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 community!

    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.

ErkS

Member
Dec 24, 2017
40
0
6
Why don't work? I wan't to add 10fire enchant to item (no set lvl 10 add +10lvl)
code_language.skript:
command /zus:
 permission: hap
 trigger:
  if player has emerald named "&a&l+3000 eur" in his inventory:
   if player is holding any sword:
    remove emerald named "c" from player's inventory
    set {_l} to level of fire aspect of the player's tool
    add 10 to {_l}
    enchant player's tool with fire aspect {_l}
    send "&e&lHAP> &fZuslachtenie bolo &a&luspesne!"
   else:
    send "&e&lHAP> &c&lChyba! &fV ruke &c&lnedrzis ziadny &fnastroj!"
  else:
   send "&e&lHAP> &c&lChyba! &fNemas &a&lgem&f!"
 
Why don't work? I wan't to add 10fire enchant to item (no set lvl 10 add +10lvl)
code_language.skript:
command /zus:
 permission: hap
 trigger:
  if player has emerald named "&a&l+3000 eur" in his inventory:
   if player is holding any sword:
    remove emerald named "c" from player's inventory
    set {_l} to level of fire aspect of the player's tool
    add 10 to {_l}
    enchant player's tool with fire aspect {_l}
    send "&e&lHAP> &fZuslachtenie bolo &a&luspesne!"
   else:
    send "&e&lHAP> &c&lChyba! &fV ruke &c&lnedrzis ziadny &fnastroj!"
  else:
   send "&e&lHAP> &c&lChyba! &fNemas &a&lgem&f!"
You can't use expressions in type values, you'll have to use the parse expression for this:
code_language.skript:
enchant tool with ("fire aspect %{_l}%" parsed as enchantment type)
 
Status
Not open for further replies.