“Cara mendapatkan nomor acak di Lua” Kode Jawaban

Cara mendapatkan nomor acak di Lua

local randomNumber1 = math.random(1, 10) --Returns a number between 1 and 10.
local randomNumber2 = math.random(10) --Also returns a number between 1 and 10.

print(randomNumber1, randomNumber2) --OUTPUT EXAMPLE: "6, 8"
Adxm

pencetakan nomor acak lua

local randomnumber = Math.Random(1, 10) -this is a random number between 1 and 10
local canprint = True
local count = 0

while canprint do --gonna loop when canprint is true
    Print(randomnumber) --gonna print random number
    wait(1) --waiting one sec
    count = count + 1 --gonna count to one. it will say that we have done it 1 time already
    if count == 10 then --if we print it 10 times it will count canprint as false
        canprint = false        
dl.idiot..

Jawaban yang mirip dengan “Cara mendapatkan nomor acak di Lua”

Pertanyaan yang mirip dengan “Cara mendapatkan nomor acak di Lua”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya