0
votes

I am developing a project that uses mp3 and .lrc file for my game in corona sdk. when i try to build it on android and run it on the android device, i got this error..

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

so i wonder that there is missing file in my game.

it is possible that the mp3 and .lrc files didn't build together with the game code?

can anyone can give idea about my case? thanks in advance ...

1

1 Answers

0
votes

Which version of director are you using? The latest version of director class (1.4 I think) prints THE ACTUAL ERROR that causes the problem.

The error which you have mentioned is just the error in director class which you have no control over. You will get something like this.

-----------------------
Director ERROR: Failed to execute new( params ) function on 'mainscreen'.
-----------------------
e:\corona\satheesh\doodle2\mainscreen.lua:35: attempt to perform arithmetic on global 'screen' (a nil value)
Runtime error

EDIT

If you need these messages to be show on device, do the following changes to director.lua

1.set

showDebug = true

2.Change

local alert = native.showAlert( "Director Class - ERROR", message, { "OK" }, onComplete )

to

local alert = native.showAlert( "Director Class - ERROR",debugMessage, { "OK" }, onComplete )