37 lines
974 B
Plaintext
37 lines
974 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Function: dragonfly_db_fnc_listRemove
|
|
* Author: Creedcoder, J.Schmidt
|
|
* Edit: 07.15.2024
|
|
*
|
|
* [Description]
|
|
* Remove element of list stored at key from DB.
|
|
*
|
|
* Arguments:
|
|
* 0: Name of stored key <STRING> (default: "")
|
|
* 1: Index of stored value in list <NUMBER> (default: -1)
|
|
*
|
|
* Return Value:
|
|
* N/A
|
|
*
|
|
* Examples:
|
|
* ["events", 0] call dragonfly_db_fnc_listRemove (Server or Singleplayer Only)
|
|
* ["events", 0] remoteExecCall ["dragonfly_db_fnc_listRemove", 2, false] (Multiplayer Only)
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
|
|
params [["_key", "", [""]], ["_index", -1, [0]]];
|
|
|
|
#ifdef __A3__DEBUG__
|
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listRemove' Key: '%1', Index: '%2'", _key, _index];
|
|
#endif
|
|
|
|
if (_key == "") exitWith {
|
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listRemove' Invalid Input for Key '%1'", _key];
|
|
};
|
|
|
|
"ArmaDragonflyClient" callExtension ["listrem", [_key, _index]];
|