AnnaBelle Posted April 20, 2017 Share Posted April 20, 2017 [2017-04-20 14:36:40] ERROR: [DayZ]\DayZ\bone_attach\attach_func.lua:117: cannot resume dead coroutine [string "?"] [DUP x5] [2017-04-20 14:36:40] ERROR: [DayZ]\DayZ\bone_attach\attach_func.lua:117: cannot resume dead coroutine [string "?"] Link to comment
AnnaBelle Posted April 20, 2017 Author Share Posted April 20, 2017 function clearAttachmentData(element) attached_ped[element] = nil attached_bone[element] = nil attached_x[element] = nil attached_y[element] = nil attached_z[element] = nil attached_rx[element] = nil attached_ry[element] = nil attached_rz[element] = nil end function forgetDestroyedElements() if not attached_ped[source] then return end clearAttachmentData(source) end addEventHandler(script_serverside and "onElementDestroy" or "onClientElementDestroy",root,forgetDestroyedElements) function forgetNonExistingPeds() local checkedcount = 0 while true do for element,ped in pairs(attached_ped) do if not isElement(ped) then clearAttachmentData(element) end checkedcount = checkedcount+1 if checkedcount >= 1000 then coroutine.yield() checkedcount = 0 end end coroutine.yield() end end clearing_nonexisting_peds = coroutine.create(forgetNonExistingPeds) setTimer(function() coroutine.resume(clearing_nonexisting_peds) end,1000,0) Link to comment
DNL291 Posted April 20, 2017 Share Posted April 20, 2017 (edited) Pode ser só aviso que mostra no Console, troque: setTimer(function() coroutine.resume(clearing_nonexisting_peds) end,1000,0) Por: setTimer( function() if coroutine.status ~= "dead" then coroutine.resume(clearing_nonexisting_peds) end end,1000,0 ) Edited April 20, 2017 by DNL291 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now