I have modified my export.lua to export things like vehicle positions, attitude data, etc. It works OK when I run missions that ship with DCS but when I run missions I've created through the mission editor with multiple aircraft available to the user nothing exports. I get an error about selfData being a nil value
DCS.openbeta\Scripts\Export.lua"]:73: attempt to index local 'selfData' (a nil value)
stack traceback:
Scripts\Export.lua"]:73: in function <[string "C:\Users\kenne\Saved Games\DCS.openbeta\Scripts\Export.lua"]:44
Line 73 is my first attempt in the script to get something from the LoGetSelfData() function. Line 44 is the beginning of the LuaExportActivityNextEvent() function
I first attempted commenting out the sanitizeModule lines, deleting everything below the dofile('Scripts/ScriptingSystem.lua'), and commenting out the do loop, and I haven't seen any change.
--local function sanitizeModule(name)
--_G[name] = nil
--package.loaded[name] = nil
--end
--do
--sanitizeModule('os')
--sanitizeModule('io')
--sanitizeModule('lfs')
--_G['require'] = nil
--_G['loadlib'] = nil
--_G['package'] = nil
--end
Any thoughts as to what I'm missing?