a is undefined here. Actually, this is different global undefined variable, not your “a”.
Do this instead:
local a
a = timer.delay(5, true, function ()
--after some time
timer.cancel(a)
end)
a is undefined here. Actually, this is different global undefined variable, not your “a”.
Do this instead:
local a
a = timer.delay(5, true, function ()
--after some time
timer.cancel(a)
end)