timer.performWithDelay() bug?

This works fine looped 8 times
[lua]timer.performWithDelay(72, timerFrameEffect, 8)[/lua]
This only looped 1 time
[lua]timer.performWithDelay(72, timerFrameEffect(para), 8)[/lua] [import]uid: 40786 topic_id: 11550 reply_id: 311550[/import]

timer.performWithDelay() expects a function. in your second example, you invoked the function, so what you actually passed was the result of that function instead of the function itself.

what you probably want to do in the second case is create a closure:
http://blog.anscamobile.com/2011/02/using-closures-in-lua-to-avoid-global-variables-for-callbacks/

or a table listener:
http://developer.anscamobile.com/content/events-and-listeners#Function_vs_Table_Listeners
[import]uid: 26 topic_id: 11550 reply_id: 41939[/import]

got it thanks walter…!! [import]uid: 40786 topic_id: 11550 reply_id: 42373[/import]