diff --git a/main.lua b/main.lua index f8b3343..4df75a3 100644 --- a/main.lua +++ b/main.lua @@ -663,6 +663,11 @@ function SetThrusterPower(thruster, power) if thruster.type == "rotator" then thruster.power = power local actualPower = 0 + if thruster.transmission == nil then + print("ERROR: SetThrusterPower called with nil transmission for rotator thruster.") + print("Thruster: "..thruster.name) + return + end if peripheral.getType(peripheral.wrap(thruster.transmission)) == "Create_RotationSpeedController" then if (math.ceil(power*256) - power*256 <= 0.5) then actualPower = math.ceil(power*256)