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
我正在爲Computercraft操作Windows 8模擬操作系統,而我的登錄系統無法正常工作。我一直試圖弄清楚過去一小時左右的情況,這真的令人沮喪。 這裏的登錄代碼: -- Log-in and User Definition Service
--- Variables
userExists = fs.exists("/Users/.config/userConfig.