Solved what is the wrong in my code

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

iAstora

Member
Jul 29, 2017
32
1
0
20
what is the wrong here in my code
this is the code
code_language.skript:
on inventory click:
    if clicked item is player head with custom nbt "{display:{Name:""Smile""},SkullOwner:{Id:""7eed1a86-983c-4fd3-95d6-1f085372628a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTJlOTgxNjVkZWVmNGVkNjIxOTUzOTIxYzFlZjgxN2RjNjM4YWY3MWMxOTM0YTQyODdiNjlkN2EzMWY2YjgifX19""}]}}}"

command /emotes:
    trigger:
        open chest with 5 rows named "&c&lEmotes" to player
        wait 2 ticks
        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""}]}}}"

this is the error
cdf.PNG
 
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_language.skript:
on inventory click:
    if clicked item is player head with custom nbt "{display:{Name:""Smile""},SkullOwner:{Id:""7eed1a86-983c-4fd3-95d6-1f085372628a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTJlOTgxNjVkZWVmNGVkNjIxOTUzOTIxYzFlZjgxN2RjNjM4YWY3MWMxOTM0YTQyODdiNjlkN2EzMWY2YjgifX19""}]}}}":
    send "test"
 
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_language.skript:
on inventory click:
    if clicked item is player head with custom nbt "{display:{Name:""Smile""},SkullOwner:{Id:""7eed1a86-983c-4fd3-95d6-1f085372628a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTJlOTgxNjVkZWVmNGVkNjIxOTUzOTIxYzFlZjgxN2RjNjM4YWY3MWMxOTM0YTQyODdiNjlkN2EzMWY2YjgifX19""}]}}}":
    send "test"
fr.PNG
 
Status
Not open for further replies.