forever loop in lua
while( true )
do
print("This loop will run forever.")
end
forever loop in lua
while( true )
do
print("This loop will run forever.")
end
infinite loop lua
-- We need to create a wait function to slow down the while true do loop.
-- The loop will run so fast, that we need to slow it down. Otherwise, it'll crash.
function wait(seconds)
local start = os.time()
repeat until os.time() > start + seconds
end
while true do -- Create the infinite loop
print("Hello World")
wait(1) -- The number you place in the paramater is how many seconds it will wait until looping again.
end
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us