dragonfly/addons/db/functions/fnc_hashSetBulk.sqf
2026-01-13 20:19:07 -06:00

36 lines
1.0 KiB
Plaintext

#include "..\script_component.hpp"
/*
* Function: dragonfly_db_fnc_hashSetBulk
* Author: Creedcoder, J.Schmidt
* Edit: 07.15.2024
*
* [Description]
* Set multiple field/value pairs in the default hash (no explicit key).
*
* Arguments:
* 0: Fields and values to store in hash <ARRAY> (default: [])
*
* Return Value:
* N/A
*
* Examples:
* [["loadout", [getUnitLoadout player], "position", [getPosASLVisual player]]] call dragonfly_db_fnc_hashSetBulk (Server or Singleplayer Only)
* [["loadout", [getUnitLoadout player], "position", [getPosASLVisual player]]] remoteExecCall ["dragonfly_db_fnc_hashSetBulk", 2, false] (Multiplayer Only)
*
* Public: Yes
*/
params [["_data", [], [[]]]];
#ifdef __A3__DEBUG__
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetBulk' Data: %1", _data];
#endif
if (_data isEqualTo []) exitWith {
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetBulk' Invalid Input for Data '%1'", _data];
};
"ArmaDragonflyClient" callExtension ["hset", _data];