【发布时间】:2013-08-27 02:09:42
【问题描述】:
这是我目前所拥有的,但似乎每次我尝试运行它时,它都会关闭。
function wait(seconds)
local start = os.time()
repeat until os.time() > start + seconds
end
function random(chance)
if math.random() <= chance then
print ("yes")
elseif math.random() > chance then
print ("no")
end
random(0.5)
wait(5)
end
这是完整的上下文。
【问题讨论】:
-
请格式化您的代码,使其清晰易读。