Difference between revisions of "MIST writeData"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Mission Scripting |fName= mist.debug.writeData| |vNum = Mist 1.0 |desc=Writes to the file Saved Games/DCS/Logs/ fileName the results of function fcn called with the varia...")
 
(No difference)

Latest revision as of 06:29, 12 April 2018


mist.debug.writeData

Added with: Mist 1.0
Description
Writes to the file Saved Games/DCS/Logs/ fileName the results of function fcn called with the variables unpacked from the table fcnVars.
Syntax
nothing mist.debug.writeData(function fcn ,table fcnVars ,string fileName )
Valid Input Values:
nothing
Return value:
nothing
Return example:
nothing
Usage Examples:
 do
 mist.debug.writeData(mist.utils.serialize,{'DBs', groupData}, 'newUnits.txt')	
 end

Notes:
For functions mist.debug.dump_G, mist.debug.writeData, and mist.debug.dumpDBs, you must (temporarily!) unprotect the Lua environment and enable the io and lfs libraries. You do this by commenting out the sanitizeModule calls in <DCS main directory>/Scripts/MissionScripting.lua. Just be sure to re-protect yourself later when you run missions from untrusted sources.
Related Functions
writeData, dumpDBs, dump_G, writeGroup, writeTypes, changeSetting

Scripting Engine

MIST Root Page