switching scenes is failing .

Sorry for being such a bug and asking so many questions butI am trying to switch from main.lua to menu.lua instantly . This s the code  have . This is the error im getting.

Code:

local storyboard = require( "storyboard" ) local widget = require( "widget" ) -- Load Corona 'ads' library local ads = require "ads" -- Hide the status bar display.setStatusBar( display.HiddenStatusBar ) -- The name of the ad provider. local provider = "admob" -- Your application ID local appID = "Bouncy balls" -- load menu screen global storyboard = storyboard.gotoScene( "menu" )

Error:

main.lua:18: ‘=’ expected near ‘storyboard’

why am I getting this there is an = by storyboard and if I put = anywhere else it says enexpected symbol ner that thing that I put the = by. lastly I put global storyboard = storyboard.gotoScene( “menu” )

cause debugger told me to . thank you

The word “global” is giving you an error since it is not a Lua keyword.

To move to another scene in storyboard:

storyboard.gotoScene("menu") 

Notice that gotoScene does not return a value, therefore there is no need to declare a variable for this call… just call it.

Also, If you are starting a new project, use composer instead of storyboard, but both work the same way. Composer replaces storyboard.

–john

Thank you so much jhon

The word “global” is giving you an error since it is not a Lua keyword.

To move to another scene in storyboard:

storyboard.gotoScene("menu") 

Notice that gotoScene does not return a value, therefore there is no need to declare a variable for this call… just call it.

Also, If you are starting a new project, use composer instead of storyboard, but both work the same way. Composer replaces storyboard.

–john

Thank you so much jhon