diff --git a/main.lua b/main.lua index 15c2073..cb26784 100644 --- a/main.lua +++ b/main.lua @@ -302,11 +302,17 @@ local function checkIfThrusterIsIndexed() local unindexedThrusters = {} for _, v in ipairs(ThrusterTypes) do - table.insert(thrusters, peripheral.find(v)) + local thrustersList = peripheral.find(v) + if thrustersList then + table.insert(thrusters, peripheral.find(v)) + end end for _, v in ipairs(PropellerTypes) do - table.insert(thrusters, peripheral.find(v)) + local thrustersList = peripheral.find(v) + if thrustersList then + table.insert(thrusters, peripheral.find(v)) + end end for _, v in ipairs(thrusters) do