Hey guys, im still getting the hang of coding and Corona SDK and am stuck solving this error.
The error is “attempt to compare nil with number” and its having the problems with line 2 of the code.
The code is supposed to scroll images out of screen and destroy it.
Any ideas whats wrong and how to solve it?
[lua]function scrollCloud(self, event)
if self.x < -480 then
display.remove(self)
Runtime:removeEventListener(“enterFrame”, self, event)
print(“destroyed”)
else
self.x = self.x - self.speed
end
end [import]uid: 220607 topic_id: 37506 reply_id: 67506[/import]