function - Attempting to make a random choice in Lua -
this have far, seems everytime attempt run it, closes.
function wait(seconds) local start = os.time() repeat until os.time() > start + seconds end function random(chance) if math.random() <= chance print ("yes") elseif math.random() > chance print ("no") end random(0.5) wait(5) end
that full context.
probably meant write this:
function wait(seconds) local start = os.time() repeat until os.time() > start + seconds end function random(chance) if math.random() <= chance print ("yes") elseif math.random() > chance print ("no") end end random(0.5) wait(5)
Comments
Post a Comment