I don’t think you can call functions like that.
Try:
function printIt()
print("times up")
end
function someeFunction()
timer.performWithDelay(10000, printIt)
end
someFunction()
timer.performWithDelay is looking for a pointer to the function. When you call print(blahlbahblah) you’re actually trying to run the print function.
I’ll test this to make sure. EDIT- Yep, worked.
just to clarify:
“myFunction” and “myFunction()” are different to the compiler. The first is the “address of” the function, the second form with the parens says to execute the function. timer.performWithDeal needs the address.
I’m surprised that it printed at all.
[import]uid: 19626 topic_id: 14016 reply_id: 51634[/import]