ComputerCraft 1.5中的Lua 这似乎工作,但递归循环运行4或5次后中断。 似乎看不出为什么。 我在这里做了令人难以置信的错误吗? Full Code 片段的循环: x = 1
function loop()
if x > 0 then
getTarg()
derp1()
sleep(2.9)
monInit()
loop()
我正在研究一个项目,我想每隔5秒更新一次屏幕上的时钟,除非用户输入内容。这是我到目前为止的代码, function thread1()
term.clear()
term.setCursorPos(1,1)
write (" SteveCell ")
local time = os.time()
local formatTime = textut
我想让计算机检查能量单元有多少功率,但是当我运行这个程序时它说:尝试索引? (一个零值) 有什么建议吗? local energyCell = peripheral.wrap("back")
local energyCellMax = energyCell.getMaxEnergyStored("top")
local productionTime = 250
local energyPer