server/addons/db/functions/fnc_saveToProfile.sqf
Jacob Schmidt bec0adcdbf feat: Update build environment and add XEH PREP
This commit includes the following changes:

-   Updates the build environment in the GitHub Actions workflow to use `ubuntu-latest` instead of `ubuntu-22.04`.
-   Adds `playerGroup2Server` to the XEH_PREP.hpp file.
-   Updates the picture path in CfgMods.hpp to include the file extension.
2025-03-28 09:46:08 -05:00

34 lines
746 B
Plaintext

#include "..\script_component.hpp"
/*
* Function: forge_server_db_fnc_saveToProfile
* Author: J. Schmidt
*
* Description:
* Saves data to profile namespace through the database interface
*
* Arguments:
* 0: _name - Store name <STRING>
* 1: _data - Data to save <HASHMAP, ARRAY, ANY>
* 2: _key - Key to save under <STRING>
*
* Return Value:
* Success <BOOL>
*/
params [
["_name", "", [""]],
["_data", nil, [createHashMap, [], "", 0, true]],
["_key", "", [""]]
];
private _database = call FUNC(verifyDB);
private _store = _database call ["getStore", [_name]];
if (isNil "_store") then {
_store = _database call ["createStore", [_name, []]];
};
[_name, _data, _key, profileNamespace] call FUNC(saveToStore);
true