I'm trying to use a for loop to destroy objects inside my array like so:
for item in self.objects do
item:removeSelf()
end
The self.objects is my array and it contains images I use for animation. If I touch one of these animated objects, it should be destroyed (disappear). My problem is, I'm getting this error message:
Attempt to call a table value
I'm not sure why I'm getting this error and how to fix it so can somebody please explain how I can remove objects from my array during touch event and why I'm getting this message? Thanks in advance. :D