Start menu not working

In my main.lua file I put code to transition to my start.lua file ( file for start menu ) . But it says that something is wrong with my code . Here is the exact code :

local composer = require “composer”
composer.gotoScene( “start” )

: (end of code) What is the problem with this code ? What should I have ?

What is the exact error you are getting?

Rob

says:

?:0: attempt to concentrate global ‘sceneName’(a nil value)

stack traceback :

                  ?: in function ‘gotoScene’

                   main.lua5: in main chunk

Do you want to relaunch project

There should be a terminal window that was opened in the background.  There should be more to the message.  Please see:

http://docs.coronalabs.com/guide/basics/debugging/index.html

If you need to know more.

Rob

@true,  

That means there is a syntax error in start.lua (the scene file).

You see this error when trying to load a composer scene which has one or more syntax errors.  Unfortunately, you may lose some of the error information when loading via composer.gotoScene(), but a scene file is effectively a module, so you might be able to find the error by doing this:

require "start" --composer.gotoScene( "start" ) 

This will load the scene file via the Lua require() mechanism.  It may help you find issues that are otherwise hidden by the scene loading process.  

Once you fix the errors, you can comment that out and use gotoScene() to load your scene.

What is the exact error you are getting?

Rob

says:

?:0: attempt to concentrate global ‘sceneName’(a nil value)

stack traceback :

                  ?: in function ‘gotoScene’

                   main.lua5: in main chunk

Do you want to relaunch project

There should be a terminal window that was opened in the background.  There should be more to the message.  Please see:

http://docs.coronalabs.com/guide/basics/debugging/index.html

If you need to know more.

Rob

@true,  

That means there is a syntax error in start.lua (the scene file).

You see this error when trying to load a composer scene which has one or more syntax errors.  Unfortunately, you may lose some of the error information when loading via composer.gotoScene(), but a scene file is effectively a module, so you might be able to find the error by doing this:

require "start" --composer.gotoScene( "start" ) 

This will load the scene file via the Lua require() mechanism.  It may help you find issues that are otherwise hidden by the scene loading process.  

Once you fix the errors, you can comment that out and use gotoScene() to load your scene.