Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
attempt to perform arithmetic on a table value: Lua error message — Gideros Forum

attempt to perform arithmetic on a table value: Lua error message

Unknown Member
edited May 2014 in Code snippets
stage:addEventListener(Event.ENTER_FRAME,
function()
Graphic:setRotation(Graphic:getRotation()+ (Timer.delayedCall(math.random(4, 8) ,
function () speed = math.random(1, 30)
return speed
end)
))
end)
Basically, what I am trying to do is, change the speed of rotation randomly, but since I do not want it to change at every second, I tried using Timer.delayedCall in Gideros, but it gives an error that says attempt to perform arithmetic on a table value: Lua error message. How can I fix this?

Comments

Sign In or Register to comment.