So I have this set up. The sound works. The endGame function also works if the function is called directly, in the scene:create( event )
.
But when I call the function from the onComplete method in the sound, the function triggers, but the i get this message "attempted to call a nil value" after the sound stops playing.
media.playSound( quotepath, {onComplete = endGame } )
the function:
function endGame()
composer.gotoScene( "scenes.gameover", "fade", 500 )
end