

It calls the LuaExportStart function just before mission start to make user script initializations. If you want to disable exporting features then remove additional third dash to make the comment multi-line again.ĭCS also prints to the Error.log file all other Lua error messages for the a script.ĭCS calls script functions for every mission simulation. So the closing multi-line comment bracket without opening one becomes the single-line comment too. For that add the single "-" just before "-[[" opening multi-line comment to convert it to the single-line comment "-[[". You need to uncomment the function LuaExportStart to activate it and to activate all other functions. c:setoption("tcp-nodelay",true) - set immediate transmission modeĭCS activates the Config\Export\a script at every mission start. c = y(nnect(host, port)) - connect to the listener socket local file = io.open("./Temp/Export.log", "w") Make initializations of your files or connections here. Uncomment this function to enable data export!

If you need to comment several lines then use "- " and "-" brackets: The Lua language use two sequential dashes "-" to start the single-line comment to the end of line. You can use them as stand alone examples for Lua script networking.Īt the top of a, there's some comments about it's use Look into the Scripts\LuaSocket folder and find a and a files. You can use LuaSocket to establish standard network connection between the a script and your local or remote program. DCS supplies LuaSocket 2.0 Beta files in the Scripts\LuaSocket folder and in the DCS installation folder.
