SimShaker-for-Aviators / SimShaker-for-Aviators-Releases

Public Repository for SimShaker for Aviators (SSA) Releases
24 stars 1 forks source link

Combined Arms (CA) unit does not provide aoa value #1

Closed funkyfranky closed 1 year ago

funkyfranky commented 2 years ago

When entering a CA ground unit, the aoa value is nil leading to errors in the dcs.log file

2022-11-12 11:38:40.717 ERROR   Lua::Config (Main): Call error LuaExportAfterNextFrame:[string "C:\Users\frank\Saved Games\DCS.openbeta\Scripts/SimShaker.lua"]:55: bad argument #2 to 'format' (number expected, got nil)
stack traceback:
    [C]: ?
    [C]: in function 'data_send'
    [string "C:\Users\frank\Saved Games\DCS.openbeta\Scripts/SimShaker.lua"]:502: in function 'AfterNextFrame'
    [string "C:\Users\frank\Saved Games\DCS.openbeta\Scripts/SimShaker.lua"]:535: in function 'LuaExportAfterNextFrame'
    [string "C:\Users\frank\Saved Games\DCS.openbeta\Scripts\SimShaker-export-core\ExportCore.lua"]:62: in function <[string "C:\Users\frank\Saved Games\DCS.openbeta\Scripts\SimShaker-export-core\ExportCore.lua"]:56>.

Lines 54/55 read

local aoa = LoGetAngleOfAttack()
dataTable.aoa = string.format("%.2f", aoa)

A nil check should be added.

f4l0 commented 2 years ago

Thx for the hint... Would also be cool to add CA to the supported "modules" :-). But I'm not sure what data DCS provides for CA

f4l0 commented 1 year ago

Should be fixed in 2.5.5 @funkyfranky