Scifer Posted October 14, 2022 Posted October 14, 2022 I'm trying to save a table to a file, just to analyze it. Path = 'd:\\' Filename = 'table.lua' Data = table UTILS.SaveToFile(Path, Filename, Data) However I get the following log message: Quote ERROR: io not desanitized. Can't save current file. I believe the path has to be de-sanitized. But how?
Chump Posted October 14, 2022 Posted October 14, 2022 You will need to edit a LUA file so that you have access to the io library. In [DCS]\Scripts\MissionScripting.lua: sanitizeModule('io') needs to be commented out: --sanitizeModule('io') 1
Scifer Posted October 15, 2022 Author Posted October 15, 2022 (edited) 16 hours ago, Chump said: You will need to edit a LUA file so that you have access to the io library. Thank you so much. However a second problem came up. Quote VFS: VFS_open_write: CreateFile(table.lua): Access is denied. Edited October 15, 2022 by Scifer
Chump Posted October 15, 2022 Posted October 15, 2022 Try removing the double backslashes from your Path variable. MOOSE will insert this between the Path and Filename for you. Also, ensure that you have write permission to the path where you are trying to store the file.
Recommended Posts