Merge pull request #2227 from shaji-Dev/develop

[FIXED] `bad argument #2 to 'format' (number expected, got nil)`
This commit is contained in:
Thomas 2025-01-26 08:38:11 +01:00 committed by GitHub
commit deb0747e66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1774,8 +1774,10 @@ function COMMANDER:RecruitAssetsForMission(Mission)
MaxWeight=cohort.cargobayLimit
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
local legions=self.legions
@ -2165,4 +2167,4 @@ end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------