Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Why can't I add an event listener to ball.body? — Gideros Forum

Why can't I add an event listener to ball.body?

ZizanymanZizanyman Member
edited June 2015 in General questions
I am using box2d, and in the function where I create a ball, I tried to add an event listener to ball.body. However, it gives me this error:

Scenes/game.lua:86: attempt to call method 'addEventListener' (a nil value)
stack traceback:
Scenes/game.lua:86: in function 'ball'
Scenes/game.lua:49: in function 'init'
[string "property.lua"]:52: in function '__new'
[string "property.lua"]:59: in function 'new'
Libraries/sceneManager.lua:279: in function 'changeScene'
Scenes/menu.lua:44: in function

Does anybody know why this is happening?

Comments

Sign In or Register to comment.