I cannot seem to get methods to work while using the director class. I’m trying to load my methods from and external file like so…
external_module.lua
[lua]module(…, package.seeall)
function obj:iSetup()
end[/lua]
current_scene.lua
[lua]module(…, package.seeall)
function new()
local localGroup = display.newGroup()
local setup = require(“external_module”)
local obj = display.newGroup()
localGroup:insert(obj)
obj:iSetup()
return localGroup
end[/lua]
I keep getting the error, “attempt to index global ‘obj’ a nil value.” I’ve tried everything I can think of but director doesn’t want to recognize my method. Are you able to use director with methods and external modules??? I would greatly appreciate your help with this. Thank you. [import]uid: 53766 topic_id: 15009 reply_id: 315009[/import]