Hello, I have a question about the tempTimer function, is it not possible to have something like below? It looks like it accepts variables but not anything with an assignment (= sign)
local t = 0
tempTimer(t=t+1, [[ send("Hello World") ]])
Does it mean i will have to do the calculations outside and then put the variable in like this?
local t = 0
t=t+1
tempTimer(t, [[ send("Hello World") ]])
Also is there a way to cancel all of the temptimers?
Thanks!
Question about tempTimer
Re: Question about tempTimer
the expression "t=t+1" doesn't return t inherently, it returns nil, so you do need to do the calculations outside of the function invocation.
There is no built in way but the following function will do it
There is no built in way but the following function will do it
-
- Posts: 2
- Joined: Tue Jun 13, 2023 9:47 pm
Re: Question about tempTimer
Understood, thanks!