This might seem like a stupid question, but can I send function arguments from within a Corona timer?
For example, here’s a completely basic function call on timer:
timer.performWithDelay( 1000, restartLevel )
If possible, I would like to send one or more arguments to the function “restartLevel”. Maybe it would look something like this (but probably not).
timer.performWithDelay( 1000, restartLevel( true, "resetScore" ) )
-- the 'true' and "resetScore" are just example arguments, sent to "restartLevel"
I know there are workarounds and other methods to solve my basic dilemma (i.e. I could set local variable flags and up-value reference them, or nest one function inside another with the first one receiving the arguments & the second one firing after the timer). But, it would be nice to just pass the arguments directly, if possible. Any suggestions?
Thanks! [import]uid: 9747 topic_id: 14712 reply_id: 314712[/import]