Ignite attacker for variable seconds

  • 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 community!

    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!

mundi

New Member
Aug 17, 2024
6
1
3
Hi, when I try to ignite the attacker for a timespan set with a variable it sends me this error:
[11:53:10 INFO]: Line 60: (customenchant/enchants.sk)
[11:53:10 INFO]: Can't understand this condition/effect: ignite attacker for %{gyido} parsed as number% second
[11:53:10 INFO]: Line: ignite attacker for %{gyido} parsed as number% second

code:
on damage:
if lore of victim's boots contain "&7Tüzes tüskék I":
add 0.5 to {gyido}
if lore of victim's leggings contain "&7Tüzes tüskék I":
add 0.5 to {gyido}
if lore of victim's chestplate contains "&7Tüzes tüskék I":
add 0.5 to {gyido}
if lore of victim's helmet contains "&7Tüzes tüskék I":
add 0.5 to {gyido}
ignite attacker for %{gyido} parsed as number% second
clear {gyido}
 
Hi, when I try to ignite the attacker for a timespan set with a variable it sends me this error:
[11:53:10 INFO]: Line 60: (customenchant/enchants.sk)
[11:53:10 INFO]: Can't understand this condition/effect: ignite attacker for %{gyido} parsed as number% second
[11:53:10 INFO]: Line: ignite attacker for %{gyido} parsed as number% second

code:
on damage:
if lore of victim's boots contain "&7Tüzes tüskék I":
add 0.5 to {gyido}
if lore of victim's leggings contain "&7Tüzes tüskék I":
add 0.5 to {gyido}
if lore of victim's chestplate contains "&7Tüzes tüskék I":
add 0.5 to {gyido}
if lore of victim's helmet contains "&7Tüzes tüskék I":
add 0.5 to {gyido}
ignite attacker for %{gyido} parsed as number% second
clear {gyido}
Since {gyido} is already a number, you don't want to parse it as one. Instead, parse it as a time span if your involving units of time like seconds.
 
Since {gyido} is already a number, you don't want to parse it as one. Instead, parse it as a time span if your involving units of time like seconds.
Thank you for your answer, but it doesn't work no matter how I parse it even not persed it sends the same error.
 
I write here on forum, i'm not tested this code.

Code:
options:
    gyido: 5 seconds

on damage:
    if lore of victim's boots contain "&7Tüzes tüskék I":
        add 0.5 seconds to {gyido}
    if lore of victim's leggings contain "&7Tüzes tüskék I":
        add 0.5 seconds to {gyido}
    if lore of victim's chestplate contains "&7Tüzes tüskék I":
        add 0.5 seconds to {gyido}
    if lore of victim's helmet contains "&7Tüzes tüskék I":
        add 0.5 seconds to {gyido}
    ignite attacker for {gyido}
    clear {gyido}

or if you use it like an integer, add what do you need to add to the variable, and before using it "set {gyido} to {gyido} parsed as time"
 
  • Like
Reactions: Luke_Sky_Walker