made spawn() log errors
This commit is contained in:
parent
f289516c9d
commit
9bc2b463ec
@ -12,7 +12,10 @@ do -- so local works
|
|||||||
_G.cT,sbt,C,T,io = 0,{},coroutine,table,io -- currentTask,sandboxTable
|
_G.cT,sbt,C,T,io = 0,{},coroutine,table,io -- currentTask,sandboxTable
|
||||||
function _G.spawn(n,f,e)
|
function _G.spawn(n,f,e)
|
||||||
tT[nP] = {}
|
tT[nP] = {}
|
||||||
tT[nP].c = coroutine.create(f)
|
local function nf()
|
||||||
|
log(xpcall(f))
|
||||||
|
end
|
||||||
|
tT[nP].c = coroutine.create(nf)
|
||||||
tT[nP].n = n
|
tT[nP].n = n
|
||||||
tT[nP].p = cT or -1
|
tT[nP].p = cT or -1
|
||||||
if tT[cT] then
|
if tT[cT] then
|
||||||
|
Loading…
Reference in New Issue
Block a user