Hello !!
I am currently developing an app which includes changing scenes…
I keep getting this error when I run it : Director ERROR: Module ‘credits’ must have a new ()function
the app contains 4 scenes, a startpage scene,a game scene, help scene and a credits scene.
**START PAGE.LUA*
module (…, package.seeall)
function new()
local startGroup = display.newGroup()
local background = display.newImage(“background.png”)
local Mybutton = display.newImage(“button.png”)
Mybutton.x = 190
Mybutton.y = 190
Mybutton.Scene = “game”
local button1 = display.newImage(“help.png”)
button1.x = 190
button1.y = 250
button1.Scene = “help”
local button2 = display.newImage(“credits.png”)
button2.x = 190
button2.y = 310
button2.Scene = “credits”
startGroup:insert(background)
startGroup:insert(Mybutton)
startGroup:insert(button1)
startGroup:insert(button2)
Mybutton:addEventListener(“touch”, changeScene)
button1:addEventListener(“touch”, changeScene)
button2:addEventListener(“touch”, changeScene)
return startGroup
end
*CREDITS.LUA*
module (…, package.seeall)
function new()
local gameGroup = display.newGroup()
print “THE CREDITS WILL GO HERE”
end
PLS HELP [import]uid: 202019 topic_id: 36475 reply_id: 336475[/import]