Hello, I’m VERY new to Solar2D and having an issue loading a scene with the composer.
main.lua
local composer = require("composer")
local w, h = display.actualContentWidth, display.actualContentHeight
local splash = display.newImageRect("splash.png",w,h)
splash.alpha = 0.0
splash.x, splash.y = w/2, h/2
transition.to(splash, {
time = 1000,
alpha = 1.0,
onComplete = function()
transition.to(splash, {
time = 1000,
delay = 1000,
alpha = 0.0,
onComplete = function()
splash:removeSelf()
splash = nil
composer.gotoScene("scene1")
end
})
end
})
scene1.lua
local composer = require("composer")
local scene = composer.newScene()
return scene
When I run the project, I get the following error:
/Users/runner/work/corona/corona/platform/resources/init.lua:964: module 'scene1' not found:
File: /Users/runner/work/corona/corona/subrepos/composer/composer.lua
Line: 1457
stack traceback:
[C]: in function 'error'
/Users/runner/work/corona/corona/subrepos/composer/composer.lua:1457: in function 'gotoScene'
main.lua:20: in function <main.lua:16>
(tail call): ?
/Users/runner/work/corona/corona/subrepos/transition/transition.lua:631: in function 'method'
/Users/runner/work/corona/corona/platform/resources/init.lua:250: in function </Users/runner/work/corona/corona/platform/resources/init.lua:209>
I have checked the scene is named correctly and does not have any extra characters, and that both files are in the same folder. If it matters, I’m using macOS Sonoma 14.6. Any and all tips appreciated, thank you!!!