Hi Guys,
I’ve been trying to organize my code a little better now that the daily builds support placing .lua files in subdirectories.
I’ve created a lib folder where I’ve placed all the libraries that I’m using (ui.lua, movieclip.lua etc…) however I’m getting the following error from the Director Class:
Runtime error
...sers/ahamidi/Dev/Corona/game/lib/director.lua:257: attempt to index global 'director' (a nil value)
Looking at line 257, I can see that’s the first point in the director file that a director method is created I.e.
function director:changeFxTime( newFxTime )
if type( newFxTime ) == "number" then
fxTime = newFxTime
end
end
I’m requiring director using director = require("lib.director")
.
I’ve noticed however that if I assign lib.director back to director, within director.lua, everything seems to work.
That’s obviously not a great way to do things so anything help would be greatly appreciated.
Ali
[import]uid: 10499 topic_id: 16612 reply_id: 316612[/import]