Jump to content

SaveSupportTable: Difference between revisions

From CMM Wiki
SaveSupportTable – created via PowerShell script (2025-11-11T21:12:30Z)
Tag: Recreated
 
m SaveSupportTable – created via PowerShell script (2026-06-24T22:27:05Z)
 
Line 1: Line 1:
{{Template:FunctionInfo|fName=          SaveSupportTable|fDescription=  Saves the current AirSupportTable configuration to a JSON file in the mission directory, ensuring the directory exists and handling errors gracefully if the table or path is invalid.|parentFile=    cmm.persistence.lua|syntax=        CMM.SaveSupportTable(FilePath <string>)|return=        nil|returnDesc=    Returns nothing.|example=        CMM.SaveSupportTable("Custom/AirSupportTable.json")|exampleDesc=    Saves the current air support configuration to a custom JSON file, creates the directory if needed, and logs warnings if the table is missing or the path is invalid.|related=        |note=          |envType= CMM|par1=        string or nil FilePath|optType1=    string or nil|optName1=    FilePath|desc1=      Optional path to save the AirSupportTable.json file; if not provided, defaults to CMM.MISSION.PDir .. "AirSupportTable.json".}}
{{Template:FunctionInfo|fName=          SaveSupportTable|fDescription=  Saves the current AirSupportTable configuration to a JSON file in the mission directory, ensuring the directory exists and handling errors gracefully if the table or path is invalid.|parentFile=    cmm.persistence.lua|syntax=        CMM.SaveSupportTable(FilePath <string>)|return=        nil|returnDesc=    Returns nothing.|example=        CMM.SaveSupportTable("Custom/CMM.PERSISTENCE_SUPPORTAIRCRAFT.json")|exampleDesc=    Saves the current air support configuration to a custom JSON file, creates the directory if needed, and logs warnings if the table is missing or the path is invalid.|related=        |note=          |envType= CMM|par1=        string or nil FilePath|optType1=    string or nil|optName1=    FilePath|desc1=      Optional path to save the CMM.PERSISTENCE_SUPPORTAIRCRAFT.json file; if not provided, defaults to CMM.MISSION.PDir .. "CMM.PERSISTENCE_SUPPORTAIRCRAFT.json".|par2=        boolean or nil DumpLua|optType2=    boolean or nil|optName2=    DumpLua|desc2=      Optional, will save out the SUPPORT_TABLE.lua file to the CMM.DUMPDIR if true, defaults to false if not provided.}}

Latest revision as of 12:27, 24 June 2026

Return to CMM Command Reference
Environment: Mission Scripting
Function: SaveSupportTable
Function Description: Saves the current AirSupportTable configuration to a JSON file in the mission directory, ensuring the directory exists and handling errors gracefully if the table or path is invalid.
File Location: cmm.persistence.lua
Syntax: CMM.SaveSupportTable( string or nil FilePath , boolean or nil DumpLua )
Return Value: nil
Parameters: Name Description
FilePathOptional path to save the CMM.PERSISTENCE_SUPPORTAIRCRAFT.json file; if not provided, defaults to CMM.MISSION.PDir .. "CMM.PERSISTENCE_SUPPORTAIRCRAFT.json".
DumpLuaOptional, will save out the SUPPORT_TABLE.lua file to the CMM.DUMPDIR if true, defaults to false if not provided.
Example: CMM.SaveSupportTable("Custom/CMM.PERSISTENCE_SUPPORTAIRCRAFT.json")
Example Description: Saves the current air support configuration to a custom JSON file, creates the directory if needed, and logs warnings if the table is missing or the path is invalid.
Related Functions:
Notes: