I am following the tutorial on how to create a custom event as shown in the link: https://coronalabs.com/blog/2012/06/26/how-to-use-custom-events-in-corona/
I copied the code directly from the article yet I’m receiving an error. No matter what I tried to do the ‘addEventListener’ method keeps returning nil. Any solution would be much appreciated.
player = {} local event = { name = "health", type = "full", healthPercent = 100 } function health\_listener( event ) if event.type == "full" then print( event.healthAmount ) end end player:addEventListener( "health", health\_listener )