Hello… I’m having a very frustrating time with timer.cancel(). I can’t seem to make the timer cancel without it giving an error. I’ve messed with it and researched it all day, but I haven’t figured it out.
I’ve made the timer with a button…
[lua]local fadeTimer = timer.performWithDelay( 3000, toFadeScreen, 1 )[/lua]
and “canceled” it with a button…
[lua]cancelTimer = timer:cancel(fadeTimer)[/lua]
It gives me this error…
Runtime error
?:0: attempt to perform arithmetic on field ‘_time’ (a nil value)
stack traceback:
[C]: ?
?: in function ‘cancel’
…/nathanballi/Documents//settingsmenu.lua:86: in function ‘onEvent’
?: in function <?:90>
?: in function <?:215>
Do you know the magic words or have any tips from experience? Let me know if you need any more info.
Nathan [import]uid: 39302 topic_id: 25898 reply_id: 325898[/import]
[import]uid: 52491 topic_id: 25898 reply_id: 104880[/import]