Beri
Beri

Reputation: 245

Corona SDK Director class error

I am developing a game in corona SDK, and I am using director class to change scene to scene and I get this error when i run the game on actual device but not in simulator.

Director Class - ERROR

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

Why did i get this error only when i run the game on the device not on simulator?

Upvotes: 0

Views: 308

Answers (2)

Malar
Malar

Reputation: 267

The simulator paths are not case sensitive (on Windows). Like if you write Images/bg.png but the path is images/Bg.png the simulator may not show any error but the device filesystem is case sensitive, so it will.

Upvotes: 1

Rob Miracle
Rob Miracle

Reputation: 3063

Please read this blog post:

http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

It will show you how to read your device's console log to get any errors or warnings that are being generated by your device. As the answer and comments above point out, 95% of the time if it works on the simulator but not on the device it's a file name case sensitivity problem. It doesn't have to be just your images either, scene names ("menu" vs. "Menu.lua") and audio resources will also case this.

Upvotes: 1

Related Questions