ERROR can't understand this condition

Discussion in 'Skript' started by PixelationYT, Jun 5, 2018.

  1. ERROR: "can't understand this condition"

    [Skript] Reloading Suministros.sk...

    [19:03:46 ERROR]: can't understand this condition: 'name of player's held item contains "&r&lSuministro Simple &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Simple"' (Suministros.sk, line 28: if name of player's held item contains "&r&lSuministro Simple &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Simple":')

    [19:03:46 ERROR]: can't understand this condition: 'name of player's held item contains "&r&lSuministro Unico &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Unico"' (Suministros.sk, line 38: if name of player's held item contains "&r&lSuministro Unico &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Unico":')

    [19:03:46 ERROR]: can't understand this condition: 'name of player's held item contains "&r&lSuministro Elite &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Elite"' (Suministros.sk, line 48: if name of player's held item contains "&r&lSuministro Elite &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Elite":')

    [19:03:46 ERROR]: can't understand this condition: 'name of player's held item contains "&r&lSuministro Epico &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Epico"' (Suministros.sk, line 58: if name of player's held item contains "&r&lSuministro Epico &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Epico":')

    [19:03:46 ERROR]: can't understand this condition: 'name of player's held item contains "&r&lSuministro Legendario &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Legendario"' (Suministros.sk, line 68: if name of player's held item contains "&r&lSuministro Legendario &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Legendario":')

    Source Code:

    Code (Text):

    on skript load:
        set {quest} to boolean
    on right click:
        if name of player's held item contains "&r&lSuministro Simple &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Simple":
            if "%region at player%" contains "Warzone":
                set {_loc} to the location at player
                set {_block} to white wool
                set {_holo} to the location 9 meters below {_loc}
                set {_r::*} to all players in radius 50 of location of player
                send "&3&l(!) Un &r&nSuministro Simple &3&lfue lanzado cerca!" to {_r::*}
                spawn undroppable falling block of {_block} named "Suministro Simple" at {_loc}
                remove 1 torch named "&r&lSuministro Simple &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Simple" from the player
    on right click:
        if name of player's held item contains "&r&lSuministro Unico &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Unico":
            if "%region at player%" contains "Warzone":
                set {_loc} to the location at player
                set {_block} to green wool
                set {_holo} to the location 9 meters below {_loc}
                set {_r::*} to all players in radius 50 of location of player
                send "&3&l(!) Un &a&nSuministro Unico &3&lfue lanzado cerca!" to {_r::*}
                spawn undroppable falling block of {_block} named "Suministro Unico" at {_loc}
                remove 1 torch named "&r&lSuministro Unico &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Unico" from the player
    on right click:
        if name of player's held item contains "&r&lSuministro Elite &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Elite":
            if "%region at player%" contains "Warzone":
                set {_loc} to the location at player
                set {_block} to blue wool
                set {_holo} to the location 9 meters below {_loc}
                set {_r::*} to all players in radius 50 of location of player
                send "&3&l(!) Un &b&nSuministro Elite &3&lfue lanzado cerca!" to {_r::*}
                spawn undroppable falling block of {_block} named "Suministro Elite" at {_loc}
                remove 1 torch named "&r&lSuministro Elite &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Elite" from the player
    on right click:
        if name of player's held item contains "&r&lSuministro Epico &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Epico":
            if "%region at player%" contains "Warzone":
                set {_loc} to the location at player
                set {_block} to yellow wool
                set {_holo} to the location 9 meters below {_loc}
                set {_r::*} to all players in radius 50 of location of player
                send "&3&l(!) Un &e&nSuministro Epico &3&lfue lanzado cerca!" to {_r::*}
                spawn undroppable falling block of {_block} named "Suministro Epico" at {_loc}
                remove 1 torch named "&r&lSuministro Epico &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Epico" from the player
    on right click:
        if name of player's held item contains "&r&lSuministro Legendario &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Legendario":
            if "%region at player%" contains "Warzone":
                set {_loc} to the location at player
                set {_block} to orange wool
                set {_holo} to the location 9 meters below {_loc}
                set {_r::*} to all players in radius 50 of location of player
                send "&3&l(!) Un &6&nSuministro Legendario &3&lfue lanzado cerca!" to {_r::*}
                spawn undroppable falling block of {_block} named "Suministro Legendario" at {_loc}
                remove 1 torch named "&r&lSuministro Legendario &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Legendario" from the player
     
    The error start in this line:

    Code (Text):
    if name of player's held item contains "&r&lSuministro Simple &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Simple":
    Thanks for ur time!
     
    #1 PixelationYT, Jun 5, 2018
    Last edited: Jun 5, 2018
  2. Please read this quote again. Specifically the words, post your source code.
     
  3. try
    Code (Text):
    if player's tool is named "&r&lSuministro Simple &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Simple":
     
  4. Code (Text):
    If name of event-item is "test":
     
  5. Hi guys! First, thanks for help me!

    But I have a NEW ERROR :(

    [09:09:03 ERROR]: Can't compare a text with '"&r&lSuministro Simple &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Simple"' (Suministros.sk, line 8: if name of event-item is "&r&lSuministro Simple &6(Click-Derecho)" with lore "&7Click-Derecho para invocar un Suministro Simple":')

    [09:09:03 ERROR]: Can't compare 'wg region at player' with a text (Suministros.sk, line 75: if wg region at player is "Warzone":')
     
  6. the second error is from another line anyway
    Code (Text):
    if "%region at player%" contains "Warzone":
     
    • Informative Informative x 1
  7. How can I apply this to factions?
     
  8. how do you wanna apply it to factions?