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 Variable not working

Discussion in 'Skript' started by _Jeeper_Creeper_, Jan 8, 2020.

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

    _Jeeper_Creeper_ New Member

    Joined:
    Jun 24, 2019
    Messages:
    6
    Likes Received:
    0
    My skript is not functioning the way it should be. It is meant for getting custom mob drops depending on the looting level of the player's sword. It only drops 1 pork chop, no matter which looting level is applied.
    Code (Text):
    1.     if victim is pig:
    2.         if colored name of victim is "&7Pig &8(&c1&8)":
    3.             clear drops
    4.             remove all xp from drops
    5.             set {_looting} to level of looting of player's tool + 1
    6.             drop {_looting} of raw porkchop named "&f&lRaw Pork" with lore "" and "&8Rarity:&7 Common" at victim's location
    7.             chance of 22%:
    8.                 drop 1 exp at victim's location
    The code also shows no errors when loading
    --- Double Post Merged, Jan 8, 2020, Original Post Date: Jan 8, 2020 ---
    closed but idk how to close it so.....

    btw the error it should be attacker's tool not player's tool
     
  2. IDuckz_

    IDuckz_ Active Member

    Joined:
    Jul 25, 2019
    Messages:
    102
    Likes Received:
    2
    Try debugging the code, like this part "set {_looting} to level of looting of player's tool + 1"
     
  3. Goose

    Goose Well-Known Member

    Joined:
    Nov 23, 2019
    Messages:
    402
    Likes Received:
    28
    If the issue is resolved, please mark the post as solved. Thanks.
     
    • Agree Agree x 1
Thread Status:
Not open for further replies.
Loading...