Beiträge von Decker_MMIV

    Code
    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:

    Code
    function ChoppedStraw:wwMinMaxAreas(self,areas)
    log("->ChoppedStraw:wwMinMaxAreas ", self, areas)
    local minA = 0;
    local maxA = 0;
    if areas ~= nil then
    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:

    Code
    ...
    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.