SaveGroupsToFile: Difference between revisions
Appearance
Ozdeadmeat (talk | contribs) SaveGroupsToFile – created via PowerShell script (2025-11-11T21:12:29Z) Tag: Recreated |
Ozdeadmeat (talk | contribs) m SaveGroupsToFile – created via PowerShell script (2026-06-24T22:27:04Z) |
||
| Line 1: | Line 1: | ||
{{Template:FunctionInfo|fName= SaveGroupsToFile|fDescription= Saves current group data for RED and BLUE sides to persistence files, with optional file paths and save flags. If no file path is provided, defaults are used. Returns true if both files were saved successfully.|parentFile= cmm.persistence.lua|syntax= CMM.SaveGroupsToFile(RedGroundFile <string|nil>, BlueGroundFile <string|nil>, SaveRed <boolean|nil>, SavedBlue <boolean|nil>)|return= boolean|returnDesc= Returns true if both RED and BLUE persistence files were saved successfully, false otherwise.|example= CMM.SaveGroupsToFile("custom_red.json", "custom_blue.json", true, false)|exampleDesc= Saves RED group data to custom_red.json and skips saving BLUE data, using custom file paths.|related= |note= |envType= CMM|par1 | {{Template:FunctionInfo|fName= SaveGroupsToFile|fDescription= Saves current group data for RED and BLUE sides to persistence files, with optional file paths and save flags. If no file path is provided, defaults are used. Returns true if both files were saved successfully.|parentFile= cmm.persistence.lua|syntax= CMM.SaveGroupsToFile(RedGroundFile <string|nil>, BlueGroundFile <string|nil>, SaveRed <boolean|nil>, SavedBlue <boolean|nil>)|return= boolean|returnDesc= Returns true if both RED and BLUE persistence files were saved successfully, false otherwise.|example= CMM.SaveGroupsToFile("custom_red.json", "custom_blue.json", true, false)|exampleDesc= Saves RED group data to custom_red.json and skips saving BLUE data, using custom file paths.|related= |note= |envType= CMM|par1= boolean or nil SaveRed|optType1= boolean or nil|optName1= SaveRed|desc1= Flag indicating whether to save RED group data (defaults to true if not provided).|par2= boolean or nil SaveBlue|optType2= boolean or nil|optName2= SaveBlue|desc2= Flag indicating whether to save BLUE group data (defaults to true if not provided).}} | ||
Latest revision as of 12:27, 24 June 2026
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | SaveGroupsToFile | |
| Function Description: | Saves current group data for RED and BLUE sides to persistence files, with optional file paths and save flags. If no file path is provided, defaults are used. Returns true if both files were saved successfully. | |
| File Location: | cmm.persistence.lua | |
| Syntax: | CMM.SaveGroupsToFile( boolean or nil SaveRed , boolean or nil SaveBlue ) | |
| Return Value: | boolean | |
| Parameters: | Name | Description |
| SaveRed | Flag indicating whether to save RED group data (defaults to true if not provided). | |
| SaveBlue | Flag indicating whether to save BLUE group data (defaults to true if not provided). | |
| Example: | CMM.SaveGroupsToFile("custom_red.json", "custom_blue.json", true, false) | |
| Example Description: | Saves RED group data to custom_red.json and skips saving BLUE data, using custom file paths. | |
| Related Functions: | ||
| Notes: | ||