async.wait
Compartido
Pausa el hilo async actual durante ms milisegundos. El resto del juego sigue en marcha.
nil|false async.wait(float ms)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| ms | float | Milisegundos de pausa. Un valor negativo vale 0. |
Retorno
Nada cuando el hilo vuelve. Solo funciona dentro de un hilo async. Fuera de uno, registra un error y devuelve false.
Ejemplo
async.thread(function()
while true do
outputDebugString("jugadores en línea: " .. #getElementsByType("player"))
async.wait(60000)
end
end)