getLatentEventStatus
Client-side
Server-side
Shared
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
Gets the status of one queued latent event.
Syntax
getLatentEventStatus ( )Code Examples
server
The example starts a latent event and outputs the status of the transfer to the client console
function beginTransfer() triggerLatentServerEvent("blah", resourceRoot, myVeryLongString) -- Start latent event myHandle = getLatentEventHandles()[#getLatentEventHandles()] -- Get last latent event handle myTimer = setTimer( updateStatus, 1000, 0 ) -- Output status once a secondend
function updateStatus() local status = getLatentEventStatus(myHandle) -- Get latent event status if not status then killTimer(myTimer) -- getLatentEventStatus returns false when the handle is no longer valid else outputConsole( "Transfer status:" .. " tickStart:" .. tostring(status.tickStart) .. " tickEnd:" .. tostring(status.tickEnd) .. " totalSize:" .. tostring(status.totalSize) .. " percentComplete:" .. tostring(status.percentComplete) ) endend