Director ERROR: Failed to execute new( params ) function on 'levelSelection' 1.4

Hiya! Hopefully someone can help me out with this question. I have no idea what happened to cause this. I am a new convert from xcode to corona so please bear with me if this is easily solvable. The app loads fine, but when I hit the start button to go to the levelSelection screen it gives me the error "Director ERROR: Failed to execute new( params ) function on 'levelSelection' ". I have no idea why, I ran the debugger and it said there is an issue with line 1093 of the director.lua file. I find it hard to believe since this file has worked before. I scanned the code over and over and still cannot seem to find the issue. Any help would be greatly appreciated.

Here is the code for mainMenu.lua which takes me to the levelSelection screen.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module(..., package.seeall)
 
function new ()
        local localGroup = display.newGroup()
 
 
 
 
-------------------
--      SCENE SET UP --
-------------------
 
local background = display.newImage("images/background.png")
localGroup:insert (background)
-- inserts background
 
local startIcon = display.newImage("images/startButton.png")
startIcon.x = 160
startIcon.y = 240
localGroup:insert(startIcon)
--inserts start icon
 
 
local function gotoLevelSelector (event)
director:changeScene ("levelSelection")
end
startIcon:addEventListener ("touch", gotoLevelSelector)
 
 
--------------------
--------------------
 
        return localGroup
end
views:1634 update:2011/10/17 21:25:02
corona forums © 2003-2011