ArmaRAMDb - List Load

ramdb_db_fnc_listLoad

Description

Retrieves all elements of a list stored at a specified key from the RAMDb database. This function is useful when you need to access the complete list data rather than individual elements, allowing operations on the entire dataset. The retrieved data is passed to a callback function for processing.

Syntax

[_key, _function, _call, _netId] call ramdb_db_fnc_listLoad

Parameters

ParameterTypeDescriptionDefault
_keyStringThe key identifying the list to be retrieved""
_functionStringThe name of the function that will receive the retrieved data""
_callBooleanWhether to call the function in an unscheduled environmentfalse
_netIdStringThe NetID of the target to return data from the function (multiplayer only)""

Return Value

No value is returned directly. The retrieved list data is passed to the specified callback function asynchronously.

Examples

Retrieve all event logs:

["events", "myProject_fnc_processEventLogs"] call ramdb_db_fnc_listLoad;

Retrieve a player list with synchronous callback:

["playerList", "myProject_fnc_processPlayerList", true] call ramdb_db_fnc_listLoad;

Send mission data to a specific client:

["missionData", "myProject_fnc_processMissionData", false, netId player] remoteExecCall ["ramdb_db_fnc_listLoad", 2, false];

Notes

  • This function retrieves the entire list stored at the specified key, making it useful when you need to process multiple elements together.
  • Both the _key and _function parameters are required. The function will exit without action if either is empty.
  • The retrieved data is processed asynchronously through the scheduler system and passed to the specified callback function.
  • For multiplayer scenarios, you can specify a target client using the _netId parameter to send the retrieved data to that specific client.
  • The _call parameter determines whether the callback function is executed in an unscheduled environment (true) or scheduled environment (false).
  • This function uses the underlying "listrng" extension with a range from 0 to -1, which retrieves all elements in the list.
  • All list operations are logged for debugging purposes.

List Add | List Delete | List Get | List Load | List Remove | List Set