Error: LUA running function 'update'
D:/Code/Giants/lsim2013_desktop/build/finalbin/dataS/scripts/vehicles/specializations/Foldable.lua(446) : attempt to compare nil with number
Has this problem been solved? - I am getting the above error in a savegame, and it took me a while to find the offender, which seems to be ChoppedStraw:wwMinMaxAreas() calling getIsAreaActive() with an incomplete 'cuttingArea' object.
I added some debug-logging to ChoppedStraw.LUA, like so:
function ChoppedStraw:wwMinMaxAreas(self,areas)
log("->ChoppedStraw:wwMinMaxAreas ", self, areas)
for _,cuttingArea in pairs(areas) do
log("->ChoppedStraw:wwMinMaxAreas - getIsAreaActive: ", table2string(cuttingArea))
if self:getIsAreaActive(cuttingArea) then
and my LOG.TXT told me the following:
0ms ->ChoppedStraw:wwMinMaxAreas table: 000000002F50BD70table: 000000002F9449F0
0ms ->ChoppedStraw:wwMinMaxAreas - getIsAreaActive: start=54574,height=54576,width=54575
Error: LUA running function 'loadSharedI3DFileFinished'
D:/Code/Giants/lsim2013_desktop/build/finalbin/dataS/scripts/vehicles/specializations/Foldable.lua(446) : attempt to compare nil with number
Notice that 'cuttingArea' does not have the two required elements; foldMaxLimit and foldMinLimit, that the getIsAreaActive() function uses in its first if-statement.