Director Class Error (Soleved)

Hey I got it right first time :slight_smile: [import]uid: 10389 topic_id: 21666 reply_id: 86352[/import]

Anybody else can help here. I have tried everything and no luck. [import]uid: 11559 topic_id: 21666 reply_id: 86360[/import]

Director errors are always very difficult to resolve as they don’t give enough information.

Can you paste the exact error from the terminal? [import]uid: 10389 topic_id: 21666 reply_id: 86363[/import]

The problem is that. In terminal everything fine “NO ERRORS”, but when i install it on device then i get error. [import]uid: 11559 topic_id: 21666 reply_id: 86366[/import]

Anyways im re-coding it from scratch now. [import]uid: 11559 topic_id: 21666 reply_id: 86367[/import]

I started from scratch and coded only this much and same error any on device. Im very confused

[code]
– level select page
module(…,package.seeall)

local background
local group
local number1
local number2
local storeButton
local menuButton

-----_---------

– Functions here

–When yes pressed then go to the app store to download pro version
–[[local function yesPressed(ev)
if ev.index ~= 1 then return end
system.openURL(“http://itunes.com/apps/AyenaLLC”)
end
–]]
– When store pressed then show native alert
local function storePressed(b)
game.playEventSound(game.soundPressed)
native.showAlert(“Upgrade”,“Would you like to upgrade to get more levels?”,{“Yes, Please.”,“No, Thanks.”}, yesHandler)
end

– Main menu button
local function menuPressed(b)
game.playEventSound(game.soundPressed)
game.changeScene(“mainscene”, “fade”)
end

function new()

group = display.newGroup()

– Add Background to the scene
background = display.newImageRect( “levelselect/levelselectbkg.png”, 480, 320 )
background.x = 240
background.y = 160
group:insert(background)

---- Add buttons to the scene
menuButton=button:create(group,1,{x=43, y=302, w=86, h=33, handler=menuPressed}, “levelselect/menu.png”) – menu button
storeButton=button:create(group,1,{x=432, y=302, w=86, h=33, handler=storePressed}, “levelselect/store.png”) – store button

return group
end
[/code] [import]uid: 11559 topic_id: 21666 reply_id: 86369[/import]

Can you upload a demo of enough code to test somewhere so I can download and try compiling it on mine? :slight_smile: [import]uid: 10389 topic_id: 21666 reply_id: 86375[/import]

Hi Ayena,
Try running through this tutorial on Director Class

it’s for 1.2 but, for the most part it’s the same
for all director module versions…

I believe your changeScene function has to be inside the
new function…also try renaming your levelscene.lua to
something else…and try…
Corona SDK 10: Screen Transitioning
by Dr. Rafael Hernandez
http://www.youtube.com/watch?v=KudLE8h4kWw
This should help clear things up for ya…:slight_smile:

Best Regards,

Larry

[import]uid: 107633 topic_id: 21666 reply_id: 86376[/import]

Thank you guys for all your help. i finally fixed it after 4 days of hard work debugging and checking code. Lol

The problem was that in inside my game folder i had subfolder named “Levelselect” with capitak L

but in my code i was passing to lower case L

Example:

[code]
menuButton=button:create(group,1,{x=43,y=302,w=86,h=33,handler=mainMenuPressed},“Levelselect/menu.png”)

instead of

menuButton=button:create(group,1,{x=43,y=302,w=86,h=33,handler=mainMenuPressed},“levelselect/menu.png”)
[/code] [import]uid: 11559 topic_id: 21666 reply_id: 86395[/import]

Check the case wins again! :slight_smile:
http://developer.anscamobile.com/forum/2012/02/10/director-class-error#comment-85948 [import]uid: 10389 topic_id: 21666 reply_id: 86399[/import]

I feel your pain man, I really do lol.

At least it’s fixed now! [import]uid: 123298 topic_id: 21666 reply_id: 86401[/import]