I only have 2 scripts in my project, both have under 10 lines. One of them is named main.lua, and the other is scene1.lua. I’m trying to go from main.lua to scene1.lua right as the app opens, but I keep getting this error.
This is the code for main.lua
local composer = require("composer") local scene = composer.newScene("main") composer.gotoScene("scene1")
And this is the code for scene1.lua
local composer = require("composer") local scene = composer.newScene("scene1") display.newText{ text = "Hello" }
As I open the app, I can see the text in the top left corner saying “Hello” but instantly after I get this error:
Attempt to concatenate global ‘sceneName’ (a nil value)
File: ?
stack traceback:
?: in function ‘gotoScene’
main.lua:5: in main chunk
I’ve gone to the wiki, copy and pasted the exact example and replaced some code to work with my own but nothing works. Anyone?