So I have Lua this function here, where, when I type the alias "test timer", "5\n", "4\n", "3\n", "2\n", "\1", is displayed, with each line being displayed 0.1 after the previous one, then display "done" when count is 0. Problem is, even though count is being decremented, the timer isn't working, and I don't know why. Any other similar timers I have are working fine. At first, I thought maybe that the timer called the function it's in was why it's not working, but I just tested that hypothesis by calling "testTimer2()" to call "testTimer()", but it's still now working. I even made the test_timer not be OneShot, but that didn't work either. What am I doing wrong?
local count = 5
function testTimer()
ColourNote("blue", "black", count)
count = count - 1
if count == 0 then
ColourNote("cyan", "black", "done")
else
AddTimer("test_timer", 0, 0, 0.1, "testTimer()", timer_flag.Enabled + timer_flag.OneShot)
SetTimerOption("test_timer", "send_to", 12)
end
end