DigitalEngine Posted July 31, 2019 Share Posted July 31, 2019 (edited) If anyone will help please, I'm attempting to follow the below video by "DCS Flighttraining" instructions on how to export data via the Export.lua file. However, I'm having no success. Can anyone tell me what I'm doing wrong? Thanks. Here is a copy of the Export.lua file. [EDIT] I found the error, a syntax error, see if you can see it (I marked it in bold red). It ":" should not be there... :doh: :wallbash: Thanks for help guys .... :glare: :badmood: :D local log_file = nil function LuaExportStart() log_file = io.open("C:/Users/Username/Saved Games/DCS/Logs/Data.txt", "w") end function LuaExportBeforeNextFrame() end function LuaExportAfterNextFrame() local IAS = LoGetIndicatedAirSpeed() log_file:write(string.format("IAS: %.4f ",IAS)) end function LuaExportStop() log_file:write(string.format("exit")) if log_file[b][color=Red]:[/color][/b] then log_file:close() log_file = nil end end function LuaExportActivityNextEvent(t) end Edited July 31, 2019 by DigitalEngine Found the Error CPU = Intel i7-6700K Motherboard = ASUS ROG Maximus VIII Hero Alpha, w/ the Intel Z170 Chipset, RAM = 64 Gigs of Ripjaws V F4-3400C16Q. GPU = Zotac GTX980ti Amp Extreme Hard-drive = Samsung V-NAD SSD 950 PRO M.2 Link to comment Share on other sites More sharing options...
hAirypAulsAck Posted March 5, 2020 Share Posted March 5, 2020 Were you ever able to get this working? I have done it in the past.. If you still want to know I can take a look for you, but I'll wait to hear back from ya Link to comment Share on other sites More sharing options...
Silvrav Posted June 2, 2020 Share Posted June 2, 2020 Maybe I can add and ask a question here - Can one export the chat to a log file or to a network socket? DCS Playlist Link to comment Share on other sites More sharing options...
DigitalEngine Posted July 31, 2020 Author Share Posted July 31, 2020 (edited) Were you ever able to get this working? I have done it in the past.. If you still want to know I can take a look for you, but I'll wait to hear back from ya Yes, I did! :chef: This is what I was looking to accomplish: local log_file = nil function LuaExportStart() log_file = io.open("C:/Users/George/Documents/Web Page Projects/rising-thunder-alpha-test/data/dcs-time.txt", "w") end function LuaExportBeforeNextFrame() end function LuaExportAfterNextFrame() end function LuaExportActivityNextEvent(t) local tNext = t local TIME = LoGetModelTime() log_file:write(string.format("Time: %.0f \n",TIME)) tNext = tNext + 6 return tNext end function LuaExportStop() log_file:write(string.format("EXIT")) if log_file then log_file:close() log_file = nil end end Here is a link to a "static" working example on github (it's static as the "time-data.txt" file is not being actively written onto on github). But it demonstrates what I am attempting to accomplish. Edited July 31, 2020 by DigitalEngine gramatical CPU = Intel i7-6700K Motherboard = ASUS ROG Maximus VIII Hero Alpha, w/ the Intel Z170 Chipset, RAM = 64 Gigs of Ripjaws V F4-3400C16Q. GPU = Zotac GTX980ti Amp Extreme Hard-drive = Samsung V-NAD SSD 950 PRO M.2 Link to comment Share on other sites More sharing options...
Recommended Posts