我将如何终止 Lua 脚本?现在我遇到了 exit() 的问题,我不知道为什么。(这更像是一个 Minecraft ComputerCraft 问题,因为它使用包含的 API。)这是我的代码:
while true do
if turtle.detect() then
if turtle.getItemCount(16) == 64 then
exit() --here is where I get problems
end
turtle.dig() --digs block in front of it
end
end