From 2d30323148bb91789bbea9b8232b31043d4e0cac Mon Sep 17 00:00:00 2001 From: templeofshadow Date: Thu, 25 Jun 2026 14:32:32 -0500 Subject: [PATCH] add nil check to thruster index checking --- main.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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