I have some timers in my script that I need to properly use killTimer upon correctly, but I keep getting errors regarding when grouping like this:
Shuj = {
aeon_timer = 0
onyx_timer = 0
sapphire_timer = 0
diamond_timer = 0
}
Lua syntax error:[String "Shuj = {..."]:4: '}' expected (to close '{' at line 1 near 'onyx_timer'
or when I have the timers as this:
aeon_timer = 0
onyx_timer = 0
sapphire_timer = 0
diamond_timer = 0
I still can't get it to properly kill the timer when aeon stops ticking. My tempTimer would tick a final time after the trigger ended.
grouping timer variables
Re: grouping timer variables
You need semicolons
Shuj = {
aeon_timer = 0;
onyx_timer = 0;
sapphire_timer = 0;
diamond_timer = 0
}
Shuj = {
aeon_timer = 0;
onyx_timer = 0;
sapphire_timer = 0;
diamond_timer = 0
}
Re: grouping timer variables
alright fixed, but it didn't solve the other issue of killing the timer once the skill ended the tic. The echo displayed again right after a final time. Like:
The aeonic field that surrounds you pulses, emitting a high-pitched screech and flashing a series of bright lights.
killTimer("aeon_timer")
aeon_timer = tempTimer(5.8, [[cecho("\n<red> Aeonfield will hit in 5s!!)
The skill's final tic ends this way:
The aeonic field that surrounds you fades away.
aeonfield_timer = 0
killTimer("aeon_timer")
The aeonic field that surrounds you pulses, emitting a high-pitched screech and flashing a series of bright lights.
killTimer("aeon_timer")
aeon_timer = tempTimer(5.8, [[cecho("\n<red> Aeonfield will hit in 5s!!)
The skill's final tic ends this way:
The aeonic field that surrounds you fades away.
aeonfield_timer = 0
killTimer("aeon_timer")
Re: grouping timer variables
You need to pass the id returned by tempTimer to kill the timer.
tempTimer returns a numeric id ( echo(tostring(aeon_timer))) ). That is what you use with killTimer.