I am getting an error saying ‘attempt to compare with nil number’
The error is on the second line where it says if self.x <-160
this is also in my create Scene
local function backgroundScroll(self,event)
if self.x < -160 then
self.x = 480
else
self.x = self.x - self.speed
end
end
background.enterFrame=backgroundScroll
Runtime:addEventListener(“enterFrame”, background)
background1.enterFrame=backgroundScroll
Runtime:addEventListener(“enterFrame”, background1)
also where do I remove these eventListeners???