timer e storyboar

hello,

I use timer with storyboard

but when I give the reload timer is doubled.

How do I fix ?

local function funcionTimer()

code…

end

timer.performWithDelay( 100, funcionTimer(), 0 );

I used an id, and tried pausing and resuming, but also gives error.

How do I remove the timer before the reload

I’m not sure what the question is, but when you call a function within a timer do not use ():

timer.performWithDelay( 100, funcionTimer, 0 );

not used, typed wrong

If you are trying to remove the timer, you need to assign it to a variable:

myTimer = timer.performWithDelay( 100, funcionTimer, 0 );

Then in your storyboard scene:exitScene call:

timer.cancel(myTimer)

I’m not sure what the question is, but when you call a function within a timer do not use ():

timer.performWithDelay( 100, funcionTimer, 0 );

not used, typed wrong

If you are trying to remove the timer, you need to assign it to a variable:

myTimer = timer.performWithDelay( 100, funcionTimer, 0 );

Then in your storyboard scene:exitScene call:

timer.cancel(myTimer)