i'm begining LUA with (luabind for c++ bindings) and it seems i didn't understood something, because when i try to declare a class with tables inside, i have a strange error.
basically, i have a class declared like:
class 'scheduler' -- function scheduler:__init(agents) print("[+] new scheduler instance ...") self.agentsCoroutines = {} self.writesQueue = {} for i,j in pairs(agents) do table.insert(self.agentsCoroutines, { coroutine.create(agents[i][1]), agents[i][2] --[[channel--]]} ) print(self.agentsCoroutines[i],"status:",coroutine.status(self.agentsCoroutines[i][1]) ) end return self end
this works, albeit when i declare this:
function scheduler.start() local myThread = self.agentsCoroutines end
i have this strange error:
Quote:
attempt to index global 'self' (a nil value)
do you know what i'm having wrong??
thank you in advance






