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)
When entering a CA ground unit, the aoa value is nil leading to errors in the dcs.log file
Lines 54/55 read
A nil check should be added.