I'm kind of very new to lua and just inherited a lua code base where I see an error happening occasionally on resuming a coroutines
--coroutine creation self._active_test_worker = coroutine.create(function(timestep) return self._active_test:worker(timestep) end) --coroutine resume local temp = type(self._active_test_worker) //thread local temp2 = type(timestep) // number local statsu = coroutine.status(self._active_test_worker) // suspended local success,action = coroutine.resume(self._active_test_worker, timestep)
The 'resume' function raises the following error intermittently
factory.lua:478: bad argument #-1 to 'resume' (expected bool)
Can someone please help me in understanding the error? What is argument -1? ( what does negative mean here?) What might raise this error? I couldn't find much online or in the docs about this error. Any help would be welcome.