Tip Side HUD spams log when on horse

User avatar
Kerbo
Posts: 13
Joined: Wed Nov 21, 2018 8:26 am

Tip Side HUD spams log when on horse

Post by Kerbo »

FS19_TipSideHUD (Version: 1.0.0.1)
https://www.farming-simulator.com/mod.p ... tle=fs2019

When this mod is loaded and player gets on a horse the draw() function spams log
FarmingSimulator2019/mods/FS19_TipSideHUD/tipSideDisplay.lua:355: attempt to call method 'getAttachedImplements' (a nil value)
2019-09-10 12:41 Error: Running LUA method 'draw'.
To avoid this error check if function exists before calling

Code: Select all

        if obj.getAttachedImplements ~= nil then
            for _, imp in pairs(obj:getAttachedImplements()) do
                addAllAttached(imp.object)
                table.insert(allImp, imp)
            end
        end