Hello everyone!
I think I stumbled into a bug.
Check this code out:
[lua]function newBall()
local randomPosition = 100 + math.random(200)
ballPosition = display.newImage(“ballPosition.png”)
ballPosition.x = randomPosition
timer.performWithDelay(2000, spawnBall(randomPosition), 1)
end[/lua]
Basically, I want balls to come from above, but I want to create an image showing the location of the incoming ball BEFORE it shows up.
So, I decided to create these two functions: newBall and spawnBall.
If I try to call the function “spawnBall” after two seconds with the delay as it is, the delay doesn’t occur and the ball is spawned imediately.
However, if I remove the “spawnBall” parameter - and use a fixed value in the function, so it looks like this:
[lua]timer.performWithDelay(2000, spawnBall, 1)[/lua]
It works out fine.
Is this a bug?
What can I do to avoid this, and how do I report it?
Thanks in advance!!! [import]uid: 11130 topic_id: 3698 reply_id: 303698[/import]



[import]uid: 11130 topic_id: 3698 reply_id: 11261[/import]