Hello everybody!
I’m new over here, I’ve got my hands on Corona SDK about 3 days ago and it blew my mind, I haven’t been so excited about programming for more than 10 years.
I’ve made great advancements so far, but while making a small test on how my app would run on my device, I got the attached error.
The app runs like a charm in the Simulator, no errors whatsoever, but when running on my device I get the error from the screenshot in a VERY SIMPLE line: sceneGroup:insert(fzLogo)
This is surely a newbie error, and yet I’ve read LOTS of guides and forum posts on the subject, I can’t find what it is, specially being a line so simple.
I’m copying the whole content of the lua file, since it’s very short.
Help please, so I can move forward!
local composer = require( "composer" ) local scene = composer.newScene() local function nextScene() composer.gotoScene("MAINMENU", {effect = "fade", time = 1500}) end -- ----------------------------------------------------------------------------------- -- Code outside of the scene event functions below will only be executed ONCE unless -- the scene is removed entirely (not recycled) via "composer.removeScene()" -- ----------------------------------------------------------------------------------- -- ----------------------------------------------------------------------------------- -- Scene event functions -- ----------------------------------------------------------------------------------- -- create() function scene:create( event ) local sceneGroup = self.view -- Code here runs when the scene is first created but has not yet appeared on screen end -- show() function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Code here runs when the scene is still off screen (but is about to come on screen) local fzLogo = display.newImage("/img/fzideas.png",display.contentCenterX,display.contentCenterY) sceneGroup:insert(fzLogo) elseif ( phase == "did" ) then -- Code here runs when the scene is entirely on screen timer.performWithDelay( 6000, nextScene ) end end -- hide() function scene:hide( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Code here runs when the scene is on screen (but is about to go off screen) elseif ( phase == "did" ) then -- Code here runs immediately after the scene goes entirely off screen end end -- destroy() function scene:destroy( event ) local sceneGroup = self.view -- Code here runs prior to the removal of scene's view end -- ----------------------------------------------------------------------------------- -- Scene event function listeners -- ----------------------------------------------------------------------------------- scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) -- ----------------------------------------------------------------------------------- return scene