【发布时间】:2015-06-21 16:14:23
【问题描述】:
ComputerCraft 1.5 中的 Lua
这似乎可行,但递归循环在运行 4 或 5 次后中断。
似乎不明白为什么。
我在这里做错了什么吗? Full Code
循环片段:
x = 1
function loop()
if x > 0 then
getTarg()
derp1()
sleep(2.9)
monInit()
loop()
end
end
loop()
【问题讨论】:
-
好吧,它最终会溢出你的堆栈,虽然不是在 5 次之后。
-
x可能与另一个全局冲突,请尝试将条件更改为if true then ...。 -
试试改成
return loop()
标签: lua computercraft