ramdb/addons/db/functions/fnc_listRemove.sqf
Jacob Schmidt 2611ad7706
All checks were successful
Build / Build (push) Successful in 33s
Removed old docs.
2026-01-13 20:29:22 -06:00

36 lines
923 B
Plaintext

#include "..\script_component.hpp"
/*
* Function: ramdb_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 ramdb_db_fnc_listRemove (Server or Singleplayer Only)
* ["events", 0] remoteExecCall ["ramdb_db_fnc_listRemove", 2, false] (Multiplayer Only)
*
* Public: Yes
*/
params [["_key", "", [""]], ["_index", -1, [0]]];
#ifdef __A3__DEBUG__
diag_log text format ["ArmaRAMDb: 'ramdb_db_fnc_listRemove' Key: '%1', Index: '%2'", _key, _index];
#endif
if (_key == "") exitWith {
diag_log text format ["ArmaRAMDb: 'ramdb_db_fnc_listRemove' Invalid Input for Key '%1'", _key];
};
"ArmaRAMDb" callExtension ["listrem", [_key, _index]];