Hey all.
I’ve run into a small error (as in it’s not stopping my app from running or anything) that says:
Director ERROR: Failed to execute new( params ) function on ‘screen1’.
my error in the console:
Runtime error
…s\mroberti\DOCUME~1\CORONA~1\Sandbox\18\director.lua:1092: attempt to
call method ‘insert’ (a nil value)
stack traceback:
[C]: in function ‘insert’
…s\mroberti\DOCUME~1\CORONA~1\Sandbox\18\director.lua:1092: in functio
n 'changeScene’Runtime error: …s\mroberti\DOCUME~1\CORONA~1\Sandbox\18\directo
r.lua:1092: attempt to call method ‘insert’ (a nil value)
stack traceback:
[C]: in function ‘insert’
…s\mroberti\DOCUME~1\CORONA~1\Sandbox\18\director.lua:1092: in functio
n ‘changeScene’
…Users\mrob
Copyright © 2009-2011 A n s c a , I n c .
Version: 2.0.0
Build: 2011.591
Like I said, it goes to my scene just fine, and lets me switch to other scenes fine too. It only happens when I start the app.
Here’s my code:
display.setStatusBar( display.HiddenStatusBar ) -- HIDE STATUS BAR
game = require("BeebeGames")
debugText = display.newText("Debug text",100,30, native.systemFont, 12)
-- LOAD DIRECTOR CLASS
Director = require("director")
require("helper")
assetPath = "Assets/"
UIPath = "Assets/Textures/UI/"
-- LOAD PARTICLE LIB (DO \*NOT\* USE LOCAL HERE, SO YOU
-- CAN ACCESS THE LIB FROM ALL YOUR LUA MODULES)
Particles = require("lib\_particle\_candy")
FXLibrary = require("lib\_particleEffects\_01")
--FXLibrary.Initialize()
-- CREATE A MAIN GROUP FOR DIRECTOR
local MainGroup = display.newGroup()
-- ADD THE GROUP FROM DIRECTOR CLASS
MainGroup:insert(director.directorView)
-- CHANGE SCENE WITHOUT EFFECTS
Director:changeScene("screen1")
I’d like to figure out why it’s doing this, not passing any params at all, just a plain ol’ scene change.
Any ideas? Appreciate any pointers!
[import]uid: 11636 topic_id: 14401 reply_id: 314401[/import]