
All checks were successful
Build / Build (push) Successful in 29s
This commit includes several improvements and fixes: * **Improved Chunking Logic:** Refactored the chunking logic in `Utils.cs` to use a more efficient approach, improving performance. The previous implementation was complex and less performant. This change simplifies the logic and improves efficiency. * **Fixed Handler Function:** Modified `fnc_handler.sqf` to correctly handle remote execution with NetIds, ensuring that if the NetId resolves to a null object, the function falls back to local execution. This prevents errors when the target object is no longer valid. * **Added Save Backup Option:** Added the ability to create a backup when saving data in `fnc_save.sqf`. This allows for data recovery in case of corruption. * **Updated DLL/SO:** Updated the ArmaRAMDb_x64.dll and ArmaRAMDb_x64.so files.
33 lines
905 B
Plaintext
33 lines
905 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Function: ramdb_db_fnc_save
|
|
* Author: Creedcoder, J.Schmidt
|
|
* Edit: 07.15.2024
|
|
* Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved
|
|
*
|
|
* Do not edit without permission!
|
|
*
|
|
* This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
|
* To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons,
|
|
* PO Box 1866, Mountain View, CA 94042
|
|
*
|
|
* [Description]
|
|
* Save to disc.
|
|
*
|
|
* Arguments:
|
|
* 0: Create backup <BOOL> (default: false)
|
|
*
|
|
* Return Value:
|
|
* N/A
|
|
*
|
|
* Examples:
|
|
* [] call ramdb_db_fnc_save (Server or Singleplayer Only)
|
|
* [] remoteExecCall ["ramdb_db_fnc_save", 2, false] (Multiplayer Only)
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params [["_createBackup", false, [false]]];
|
|
|
|
"ArmaRAMDb" callExtension ["save", [_createBackup]]; |