From bd5b6376e9496023c71ab2cc1f0021e680846f21 Mon Sep 17 00:00:00 2001 From: templeofshadow Date: Thu, 25 Jun 2026 11:43:54 -0500 Subject: [PATCH] fixed some misuse of ipairs over pairs --- main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.lua b/main.lua index a6421ec..15406a8 100644 --- a/main.lua +++ b/main.lua @@ -179,9 +179,9 @@ function ThrottleInit() while true do local currentStates = getRelayStates() - for pname, currentState in ipairs(currentStates) do + for pname, currentState in pairs(currentStates) do local initialState = initialStates[pname] - for k, v in ipairs(currentState) do + for k, v in pairs(currentState) do if initialState[k] ~= v then Throttles[throttleType].name = pname Throttles[throttleType].side = k @@ -545,8 +545,8 @@ function UpdateGlobalThrust() end end - for _, d in ipairs(thrustDirections) do - for _, t in ipairs(Thrusters) do + for _, d in pairs(thrustDirections) do + for _, t in pairs(Thrusters) do if t.affectVectors.lateral == d then SetThrusterPower(t, d) end