updated
This commit is contained in:
19
main.lua
19
main.lua
@@ -100,6 +100,7 @@ local function runSafe()
|
||||
|
||||
startup();
|
||||
monitor.clear();
|
||||
monitor.setBackgroundColor(colors.black)
|
||||
-- local names = peripheral.getNames()
|
||||
-- for index, value in ipairs(names) do
|
||||
-- print(index, value)
|
||||
@@ -109,15 +110,15 @@ local function runSafe()
|
||||
end
|
||||
|
||||
local function run()
|
||||
runSafe()
|
||||
-- local success, err = pcall(runSafe)
|
||||
-- if not success then
|
||||
-- monitor.setTextColor(colors.red)
|
||||
-- monitor.write("Error: " .. err)
|
||||
-- isErrorState = true
|
||||
-- modem.open(500)
|
||||
-- modem.transmit(500, 500, "Error: " .. err)
|
||||
-- end
|
||||
local success, err = pcall(runSafe)
|
||||
if not success then
|
||||
monitor.setTextColor(colors.red)
|
||||
monitor.write("Error: " .. err)
|
||||
isErrorState = true
|
||||
modem.open(500)
|
||||
modem.transmit(500, 500, "Error: " .. err)
|
||||
os.reboot()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user