“Fonction d'attente Lua” Réponses codées

Fonction d'attente Lua

function wait(seconds)
    local start = os.time()
    repeat until os.time() > start + seconds
end
--Exactly the same as the roblox one!
Tes

Fonction d'attente reconstruite dans Lua

function wait(seconds)
  local start = os.time()
  repeat until os.time() > start + seconds
end

-- This is the wait function (mostly known from roblox)
-- It works exactly like the roblox version
-- It's used like this: wait(how many seconds)
Stupid Skipper

attendre () dans Lua

wait(5)  -- Waits 5 seconds then prints "Hello world!"
print("Hello world!")
Sticky

Fonction d'attente Lua

--example of wait()

local number = 1
wait(number) --it will wait the varible number
local newnumber = number + number --result = 2
wait(newnumber) --can add numbers too
print("okay the script is over. i waited 3 sec") -- you can delete this
--wait is used to wait some seconds.

--you can do this too
wait(0.1)
wait(0.002938234)
wait(0.9999)
--the 3 numbers are now below 1 sec

--it works like this : wait(seconds)
dl.guy

Fonction d'attente Lua

local function Wait(s)
  local c = os.time()
  
  repeat until c >= c + s
 end
Troubled Termite

Fonction d'attente Lua

wait(5)
pro gamer

Réponses similaires à “Fonction d'attente Lua”

Questions similaires à “Fonction d'attente Lua”

Plus de réponses similaires à “Fonction d'attente Lua” dans Lua

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code