Jump to content

Recommended Posts

Posted

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?

Posted

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')

 

  • Thanks 1
Posted (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 by Scifer
Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...