Hello, i am having a problem with removing a event listenr.
This is the error
Runtime error
/Users/gzijlstra/Desktop/App/First Project/game.lua:94: attempt to call method 'removeEventListener' (a nil value)
stack traceback:
[C]: in function 'removeEventListener'
/Users/gzijlstra/Desktop/App/First Project/game.lua:94: in function 'gameover'
This is the code i have to remove it:
[lua]for g=1,n do
name = spawn[g]
name:removeEventListener(“touch”, delete)
end[/lua]
For this - I’m guessing it may be the order of your code, however I would want to see it all together.
Could you post a plug and play example showing your error? If so I should be able to fix it for you. [import]uid: 52491 topic_id: 24022 reply_id: 97250[/import]
Did you come up with a solution for removing an Eventlistener from a table ?
edit: I also just read an article from corona where it says that it automatically removes the eventlistener as soon as the object gets removed. so problem solved? [import]uid: 140000 topic_id: 24022 reply_id: 130793[/import]
Did you come up with a solution for removing an Eventlistener from a table ?
edit: I also just read an article from corona where it says that it automatically removes the eventlistener as soon as the object gets removed. so problem solved? [import]uid: 140000 topic_id: 24022 reply_id: 130793[/import]