Story board issue

i have this code in my main.lua 

local storyboard = require(“storyboard”)

math.randomseed(os.time())

display.setStatusBar(display.hiddenStatusBar)

storyboard.gotoScene(“scene1”)

i then have this in my scene 1.lua  (just the beginning of my program) 

local storyboard = require(“storyboard”)

local scene1 = storyboard.newScene()

local startup = display.newText(“CLICK ANYWHERE TO START”, 0, 0, native.systemFontBold,20)

local warning = display.newText("DONT FORGET THE NARWHALS A RAGING DIABETIC ", 0, 0, native.systemFontBold,20)

startup.x = display.viewableContentWidth /2

startup.y = display.viewableContentHeight  / 2 

warning.x = (display.viewableContentWidth /2) 

warning.y = (display.viewableContentHeight  / 2) + 50 

when i run the app it gives me the error 

?:0: attempt to concatenate the global ‘sceneName’ (a nil value) stack traceback:

?: in function ‘gotoScene’

main.lua:4: in main chunk 

can anyone tell me what I am doing wrong because I can not figure it out for the life of me 

You likely don’t have a complete scene.  The scene should start with:

local storyboard = require(“storyboard”)

local scene = storyboard.newScene()

and end with:

return scene

Take the 1 off of the scene’s name, if you want the 1, you have to use it everywhere that you’re referencing that object (i.e. return scene1), but since it’s the only scene in the file, you don’t need to number them.  The filename “scene1.lua” is sufficient.  In other words, the “scene” in the code is not related to the lua file name.

Next, there are multiple events that are triggered through out the lifecycle of a scene that are used to create the scene, show the scene, hide the scene etc.  Your scene file needs to implement these.  Once you implement the createScene() event handler, all the rest of  your code where you create your display objects should be created inside the createScene() function.

Now all that said, Storyboard is deprecated in favor Composer (Storyboard 2.0).  You should switch to that if you’re not too vested in Storyboard.  Similar concepts.

Rob

You likely don’t have a complete scene.  The scene should start with:

local storyboard = require(“storyboard”)

local scene = storyboard.newScene()

and end with:

return scene

Take the 1 off of the scene’s name, if you want the 1, you have to use it everywhere that you’re referencing that object (i.e. return scene1), but since it’s the only scene in the file, you don’t need to number them.  The filename “scene1.lua” is sufficient.  In other words, the “scene” in the code is not related to the lua file name.

Next, there are multiple events that are triggered through out the lifecycle of a scene that are used to create the scene, show the scene, hide the scene etc.  Your scene file needs to implement these.  Once you implement the createScene() event handler, all the rest of  your code where you create your display objects should be created inside the createScene() function.

Now all that said, Storyboard is deprecated in favor Composer (Storyboard 2.0).  You should switch to that if you’re not too vested in Storyboard.  Similar concepts.

Rob