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 what is the wrong in my code

Discussion in 'Skript' started by iAstora, Aug 10, 2017.

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

    iAstora Member

    Joined:
    Jul 29, 2017
    Messages:
    32
    Likes Received:
    1
    what is the wrong here in my code
    this is the code
    Code (Skript):
    1. on inventory click:
    2.     if clicked item is player head with custom nbt "{display:{Name:""Smile""},SkullOwner:{Id:""7eed1a86-983c-4fd3-95d6-1f085372628a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTJlOTgxNjVkZWVmNGVkNjIxOTUzOTIxYzFlZjgxN2RjNjM4YWY3MWMxOTM0YTQyODdiNjlkN2EzMWY2YjgifX19""}]}}}"
    3.  
    4. command /emotes:
    5.     trigger:
    6.         open chest with 5 rows named "&c&lEmotes" to player
    7.         wait 2 ticks
    8.         set slot 10 of player's current inventory to player head with custom nbt "{display:{Name:""Smile""},SkullOwner:{Id:""7eed1a86-983c-4fd3-95d6-1f085372628a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTJlOTgxNjVkZWVmNGVkNjIxOTUzOTIxYzFlZjgxN2RjNjM4YWY3MWMxOTM0YTQyODdiNjlkN2EzMWY2YjgifX19""}]}}}"
    9.  
    this is the error
    cdf.PNG

     
  2. Best Answer:
    Post #4 by ShaneBee, Aug 10, 2017
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    perhaps try
    if %clicked item% is playerhead...
     
    • Like Like x 1
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    the same problem
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    ah i think the issue was you not having a colon after it. all "if" statements need a colon at the end. Without the effect after it (in this case send "test") you'll get an empty configuration error but it will still load.
    reloaded this on my server and it loaded just fine
    Code (Skript):
    1. on inventory click:
    2.     if clicked item is player head with custom nbt "{display:{Name:""Smile""},SkullOwner:{Id:""7eed1a86-983c-4fd3-95d6-1f085372628a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTJlOTgxNjVkZWVmNGVkNjIxOTUzOTIxYzFlZjgxN2RjNjM4YWY3MWMxOTM0YTQyODdiNjlkN2EzMWY2YjgifX19""}]}}}":
    3.     send "test"
     
    • Winner Winner x 1
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    fr.PNG
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    I don't get that error on reload with the code I posted. what are you versions? I"m on mc 1.12 skript 2.2 dev 30 bensku
     
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    tg.PNG
     
  9. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    That doesnt answer my questionx3, but I would do as it says and remove all your addons and add them back one by one to see if one is causing the error. one of them is likely outdated
    --- Double Post Merged, Aug 11, 2017, Original Post Date: Aug 11, 2017 ---
    Oh good it worked^-^ neato
     
Thread Status:
Not open for further replies.

Share This Page

Loading...