rename symbol because idk what else to do
This commit is contained in:
10
main.lua
10
main.lua
@@ -62,15 +62,15 @@ Config.Monitors.AutopilotControlMonitor = nil
|
||||
|
||||
function identifyMonitor(monitorType)
|
||||
-- Find all available monitors
|
||||
local availableMonitors = peripheral.find("monitor")
|
||||
local monitors = peripheral.find("monitor")
|
||||
|
||||
if not availableMonitors or #availableMonitors == 0 then
|
||||
if not monitors or #monitors == 0 then
|
||||
print("No monitors found on the network.")
|
||||
return nil
|
||||
end
|
||||
|
||||
print("Available monitors:")
|
||||
for i, name in ipairs(availableMonitors) do
|
||||
for i, name in ipairs(monitors) do
|
||||
local monitor = peripheral.wrap(name)
|
||||
if monitor then
|
||||
local width, height = monitor.getSize()
|
||||
@@ -84,12 +84,12 @@ function identifyMonitor(monitorType)
|
||||
local input = read()
|
||||
local choice = tonumber(input)
|
||||
|
||||
if not choice or choice < 1 or choice > #availableMonitors then
|
||||
if not choice or choice < 1 or choice > #monitors then
|
||||
print("Invalid selection.")
|
||||
return nil
|
||||
end
|
||||
|
||||
local selectedMonitorName = availableMonitors[choice]
|
||||
local selectedMonitorName = monitors[choice]
|
||||
local selectedMonitor = peripheral.wrap(selectedMonitorName)
|
||||
|
||||
print("Selected monitor: " .. selectedMonitorName)
|
||||
|
||||
Reference in New Issue
Block a user