Tic-Tac Posted October 10, 2016 Posted October 10, 2016 I'm trying to output some data as a txt file to then read into Voice attack, as I'm not over experienced with LUA I'm trying to make sure each step of my plan is doable before jumping in, but am stuck with the export piece. Everything I've learned so far has come form some very helpful posts in this forum, but it seems what others report 'works fine' I still get an error, so maybe a basic misunderstanding on my part I'm saving the code below as a .lua file and then using 'do script file' to trigger the script somedata = "Interesting information" local exportFile = io.open("G:\LUA\file.txt", "w") exportFile:write(somedata) exportFile:close() However I get an error message (attached) I;m running DCS 1.5 as admin, and have created the file in the location referenced in the script Any ideas/comments/suggestions gratefully received! thanks
Whisper Posted October 10, 2016 Posted October 10, 2016 AFAIK these libs are protected in DCS. In this file : <DCS main directory>/Scripts/MissionScripting.lua there are calls to a SanitizeModule function which prohibits the use of these libs. You need to comment out the corresponding line to be able to use the lib. 2 Whisper of old OFP & C6 forums, now Kalbuth. Specs : i7 6700K / MSI 1070 / 32G RAM / SSD / Rift S / Virpil MongooseT50 / Virpil T50 CM2 Throttle / MFG Crosswind. All but Viggen, Yak52 & F16
Tic-Tac Posted October 11, 2016 Author Posted October 11, 2016 Thanks Whisper, now all working as expected...
Ignition Posted July 17, 2022 Posted July 17, 2022 On 10/10/2016 at 10:03 AM, Whisper said: AFAIK these libs are protected in DCS. In this file : <DCS main directory>/Scripts/MissionScripting.lua there are calls to a SanitizeModule function which prohibits the use of these libs. You need to comment out the corresponding line to be able to use the lib. Thanks!
Recommended Posts