SOLVED
Hi all,
I have a scene with a bunch of clouds in it and I’m moving all the clouds at the same time. When I try to change my scene, I’m getting this error: ‘for’ limit must be a number.
Here is the chunk of code that’s causing the problems.
function moveClouds() for i=1, cloudGroup.numChildren do if ((cloudGroup[i]).x) \> display.contentWidth + 410 then (cloudGroup[i]).x = -410 (cloudGroup[i]).y = math.random( display.contentHeight \* 0.05, display.contentHeight \* 0.45 ) else (cloudGroup[i]).x = (cloudGroup[i]).x + 0.2 end end end
Any help is appreciated.