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