[FIXED] bad argument #2 to 'format' (number expected, got nil)

This commit is contained in:
Shafik 2025-01-26 00:19:19 +02:00
parent 03cd354f9e
commit 00f5fde5a8

View File

@ -1774,8 +1774,10 @@ function COMMANDER:RecruitAssetsForMission(Mission)
MaxWeight=cohort.cargobayLimit MaxWeight=cohort.cargobayLimit
end end
end end
self:T(self.lid..string.format("Largest cargo bay available=%.1f", MaxWeight)) if MaxWeight then
self:T(self.lid..string.format("Largest cargo bay available=%.1f", MaxWeight))
end
end end
local legions=self.legions local legions=self.legions
@ -2165,4 +2167,4 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------