Some errors in my scripts when upgrading to 1.12

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

Lummox

Member
Jan 29, 2017
28
0
1
42
All my scripts work fine on 1.11, but when I upgrade the server to 1.12, I have these errors:

## (I'm using the latest versions of all plugins / addons)
** Bensku -> Dev30C

-- [Server thread/ERROR]: [Skript] Can't understand this condition/effect: add "{HideFlags:2}" to nbt of slot 0 of current inventory of player (crafteos.sk, line 57: add "{HideFlags:2}" to nbt of slot 0 of current inventory of player')

code_language.skript:
on inventory click:
    if player's target block is craft:
        if clicked slot is 0:
            if event-item is iron sword:
                if player has permission "skripts.herrero.1":
                    if {nivelup.nivel.%player%} is between 1 and 5:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 1 - 5"
                    else if {nivelup.nivel.%player%} is between 6 and 10:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 6 - 10"
                    else if {nivelup.nivel.%player%} is between 11 and 15:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 11 - 15"
                    else if {nivelup.nivel.%player%} is between 16 and 20:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 16 - 20"
                    else if {nivelup.nivel.%player%} is between 21 and 25:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 21 - 25"
                    else if {nivelup.nivel.%player%} is between 26 and 30:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 26 - 30"
                    else if {nivelup.nivel.%player%} is between 31 and 35:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 31 - 35"
                    else if {nivelup.nivel.%player%} is between 36 and 40:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 36 - 40"
                    else if {nivelup.nivel.%player%} is between 41 and 45:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 41 - 45"
                    else if {nivelup.nivel.%player%} is between 46 and 50:
                        add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
                        set line 1 of the lore of slot 0 of current inventory of player to "Daño: 46 - 50"
                    else:
                        cancel event
                        message "<light red>Necesitas aprender la habilidad <orange>herrero <light red>para poder fabricar este arma."
                        stop
                else:
                    message "<light red>No tienes la habilidad ""<orange>Herrero LvL: <yellow>1<light red>"" para poder craftear esto."
                    cancel event
            if event-item is iron helmet:
                add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
            if event-item is iron chestplate:
                add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
            if event-item is iron leggings:
                add "{HideFlags:2}" to nbt of slot 0 of current inventory of player
            if event-item is iron boots:
                add "{HideFlags:2}" to nbt of slot 0 of current inventory of player

-- [Server thread/ERROR]: Can't understand this condition/effect: show 100 Fireworks_Spark particle at location 1 blocks above targeted entity for player offset by 0, 0, 0 at speed 0.1 (ganaderia.sk, line 81: show 100 Fireworks_Spark particle at location 1 blocks above targeted entity for player offset by 0, 0, 0 at speed 0.1')

code_language.skript:
on right click:
    if player is holding a potato:
        if entity's target is a cow:
            if metadata value "salvaje" of targeted entity is 5:
                remove 1 potato from player's tool
                set metadata value "salvaje" of targeted entity to 4
                message "{@prefijos-ganaderia-valor} <yellow>Tienes que alimentar <orange>%metadata value ""salvaje"" of targeted entity% <yellow>veces mas a esta vaca para tamearla"
                stop
            else if metadata value "salvaje" of targeted entity is 4:
                remove 1 potato from player's tool
                set metadata value "salvaje" of targeted entity to 3
                message "{@prefijos-ganaderia-valor} <yellow>Tienes que alimentar <orange>%metadata value ""salvaje"" of targeted entity% <yellow>veces mas a esta vaca para tamearla"
                stop
            else if metadata value "salvaje" of targeted entity is 3:
                remove 1 potato from player's tool
                set metadata value "salvaje" of targeted entity to 2
                message "{@prefijos-ganaderia-valor} <yellow>Tienes que alimentar <orange>%metadata value ""salvaje"" of targeted entity% <yellow>veces mas a esta vaca para tamearla"
                stop
            else if metadata value "salvaje" of targeted entity is 2:
                remove 1 potato from player's tool
                set metadata value "salvaje" of targeted entity to 1
                message "{@prefijos-ganaderia-valor} <yellow>Tienes que alimentar <orange>%metadata value ""salvaje"" of targeted entity% <yellow>veces mas a esta vaca para tamearla"
                stop
            else if metadata value "salvaje" of targeted entity is 1:
                play sound "ENTITY_EXPERIENCE_ORB_PICKUP" to player with volume 1 and pitch 2
                show 100 Fireworks_Spark particle at location 1 blocks above targeted entity for player offset by 0, 0, 0 at speed 0.1
                remove 1 potato from player's tool
                delete metadata value "salvaje" of targeted entity
                set metadata value "vida" of targeted entity to a rounded random number between 900 and 100
                set metadata value "hambre" of targeted entity to 20
                set name of targeted entity to "<orange>Vaca de ganado"
                message "{@prefijos-ganaderia-valor} <light green>Ahora es una vaca de ganado."
                stop
            else if metadata value "hambre" of targeted entity is between 15 and 20:
                message "{@prefijos-ganaderia-valor} <light green>No tiene hambre <aqua>(<silver>%metadata value ""hambre"" of targeted entity%<aqua>)"
                message "{@prefijos-ganaderia-valor} Vida: <light red>%metadata value ""vida"" of targeted entity%"
                stop
            else if metadata value "hambre" of targeted entity is between 10 and 14:
                message "{@prefijos-ganaderia-valor} <yellow>Tiene hambre <aqua>(<silver>%metadata value ""hambre"" of targeted entity%<aqua>)"
                message "{@prefijos-ganaderia-valor} Vida: <light red>%metadata value ""vida"" of targeted entity%"
                stop
            else if metadata value "hambre" of targeted entity is between 5 and 9:
                message "{@prefijos-ganaderia-valor} <orange>Tiene mucha hambre <aqua>(<silver>%metadata value ""hambre"" of targeted entity%<aqua>)"
                message "{@prefijos-ganaderia-valor} Vida: <light red>%metadata value ""vida"" of targeted entity%"
                stop
            else if metadata value "hambre" of targeted entity is between 1 and 4:
                message "{@prefijos-ganaderia-valor} <light red>O la alimentas pronto o morirá. <aqua>(<silver>%metadata value ""hambre"" of targeted entity%<aqua>)"
                message "{@prefijos-ganaderia-valor} Vida: <light red>%metadata value ""vida"" of targeted entity%"
                stop
    if player is holding a apple:
        if entity's target is a cow:
            if metadata value "hambre" of targeted entity is less than 20:
                set metadata value "hambre" of targeted entity to 20
                remove 1 apple from player's tool
                message "{@prefijos-ganaderia-valor} <light green>Has saciado su hambre <aqua>(<silver>%metadata value ""hambre"" of targeted entity%<aqua>)"
                stop
    if player is holding a carrot:
        if entity's target is a cow:
            if metadata value "hambre" of targeted entity is less than 20:
                set metadata value "hambre" of targeted entity to 20
                remove 1 carrot from player's tool
                message "{@prefijos-ganaderia-valor} <light green>Has saciado su hambre <aqua>(<silver>%metadata value ""hambre"" of targeted entity%<aqua>)"
                stop
 
Last edited:
Thanks, that has solved one of the errors (I have already crossed out), now only need to know why the other does not work. I know that showing the particles is "SkRayfall", but I have it in its latest version, 1.9.10
[doublepost=1504370632,1502823274][/doublepost]Any idea?
 
Status
Not open for further replies.