Stack traceback when i run my app in the simulator

Start what from scratch ?

Your whole project … With composer. Because you don’t seem to understand what we are trying to tell you.

So make a new project and add composer to it and put new code in it.

–SonicX278

But i am following a tutorial and it is telling me to use storyboard .

What tutorial?

I am following a tutorial on youtube 

There are a ton of older tutorials. If you put storyboard.lua in with your main.lua, it should work.  Can you provide a directory listing of the files in the folder with your main.lua?

Also since we are addressing this in this thread, you really didn’t need to start a second thread. I’ve locked your other thread.

I don’t have a storyboard.lua that’s what the error is 

You have to follow these steps to get storyboard for your app. We took it out of Corona and made it available as an optional file. You have to download it from the website and copy the file into your project in the same folder with your main.lua:

  1. Go to:   http://github.com/coronalabs/framework-storyboard-legacy

  2. Download it.

  3. Copy the storyboard.lua to your project in the same folder as your main.lua

Rob

I can’t download it . I don’t see the download icon 

Thanks a lot I got it

Are you using the latest build of corona? 

If you are then your out of luck. Corona SDK got rid of storyboard and fully started using composer.

Check out this link for composer. 

https://docs.coronalabs.com/daily/api/library/composer/index.html

I like it much better than story board anyways.

Good Luck!

It’s still not working 

Did you competently change to composer? Whats in your game scene? Please post some code?

Thanks!

game.lua :

-- requires local physics = require "physics" physics.start() local composer = require ("composer") composer.newScene() -- background function scene:createScene(event) local screenGroup = self.view local background = display.newImageRect("bg.png",display.contentWidth,display.contentHeight) background.x = display.contentCenterX background.y = display.contentCenterY local city1 = display.newImage("city1.png") city1.x = 240 city1.y = 210 city1.speed = 2 local city2 = display.newImage("city1.png") city2.x = 240 city2.y = 270 city2.speed = 2 local city3 = display.newImage("city2.png") city3.x = 240 city3.y = 270 city3.speed = 3 local jet = display.newImage("redJet.png") jet.x = 100 jet.y = 100 physics.addBody(jet, "dynamic", {density=.1, bounce=0.1, friction=.2, radius=12}) local city4 = display.newImage("city2.png") city4.x = 240 city4.y = 270 city4.speed = 3 end function scrollCity( self, event ) if self.x \< -200 then self.x = 200 else self.x = self.x - self.speed end end -- jet function activateJets( self, event ) self:applyForce(0, -3.0, self.x, self.y) end function touchScreen( event ) if event.phase == "began" then jet.enterFrame = activateJets Runtime: addEventListener("enterFrame", jet) end if event.phase == "ended" then Runtime: removeEventListener("enterFrame", jet) end end function scene:enterScene(event) city1.enterFrame = scrollCity Runtime:addEventListener("enterFrame", city1) city2.enterFrame = scrollCity Runtime:addEventListener("enterFrame", city2) city3.enterFrame = scrollCity Runtime:addEventListener("enterFrame", city3) city4.enterFrame = scrollCity Runtime:addEventListener("enterFrame", city4) Runtime:addEventListener("touch", touchScreen) end function scene:exitScene(event) end function scene:destroyScene(event) end scene:addEventListener("createScene", scene) scene:addEventListener("enterScene", scene) scene:addEventListener("exitScene", scene) scene:addEventListener("destroyScene", scene) return scene

main.lua

local composer = require( "composer" ) composer.getScene( "game" )

You are using composer wrong … Did you read the docs? Here’s how you need to do it… ( Im not sure if i put your code in wrong but this is the base of it )

game.lua

local composer = require( "composer" ) local scene = composer.newScene() ------------------------------------------------------------------------------------------ system.setIdleTimer( false ) ------------------------------------------------------------------------------------------ local widget = require( "widget" ) ------------------------------------------------------------------------------------------ function scene:create( event ) local sceneGroup = self.view -- put your back ground and stuff you wont need to access as eventlisteners. end function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "did" ) then local background = display.newImageRect("bg.png",display.contentWidth,display.contentHeight) background.x = display.contentCenterX background.y = display.contentCenterY local city1 = display.newImage("city1.png") city1.x = 240 city1.y = 210 city1.speed = 2 local city2 = display.newImage("city1.png") city2.x = 240 city2.y = 270 city2.speed = 2 local city3 = display.newImage("city2.png") city3.x = 240 city3.y = 270 city3.speed = 3 local jet = display.newImage("redJet.png") jet.x = 100 jet.y = 100 physics.addBody(jet, "dynamic", {density=.1, bounce=0.1, friction=.2, radius=12}) local city4 = display.newImage("city2.png") city4.x = 240 city4.y = 270 city4.speed = 3 end function scrollCity( self, event ) if self.x \< -200 then self.x = 200 else self.x = self.x - self.speed end end -- jet function activateJets( self, event ) self:applyForce(0, -3.0, self.x, self.y) end function touchScreen( event ) if event.phase == "began" then jet.enterFrame = activateJets Runtime: addEventListener("enterFrame", jet) end if event.phase == "ended" then Runtime: removeEventListener("enterFrame", jet) city1.enterFrame = scrollCity Runtime:addEventListener("enterFrame", city1) city2.enterFrame = scrollCity Runtime:addEventListener("enterFrame", city2) city3.enterFrame = scrollCity Runtime:addEventListener("enterFrame", city3) city4.enterFrame = scrollCity Runtime:addEventListener("enterFrame", city4) Runtime:addEventListener("touch", touchScreen) end end scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) return scene

main.lua

local composer = require( "composer" ) composer.gotoScene( "game" )

–SonicX278

You’re better off using composer, but you can still get storyboard here:

https://github.com/coronalabs/framework-storyboard-legacy

And… composer is not a drop in replacement for storyboard.  You need to update your scene code a little (tiny changes).

Still doesn’t work. I don’t know what else to do.

Ok try this. 

game.lua

local composer = require( "composer" ) local scene = composer.newScene() function scene:create( event ) local sceneGroup = self.view end function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "did" ) then local BG = display.newRect( display.contentCenterX, display.contentCenterY, 1080, 1920 ) end end scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) return scene

 And the latest main.lua.

–SonicX278

i have to replace my whole code with that 

Yes, Just to see if its your code or my code. If its my code ( Which it cant be i have tested it. ) then i will give you a composer sample project.

–SonicX278