ArmaRAMDb - Get Key

ramdb_db_fnc_get

Description

Retrieves the value of a stored key from the database. This function performs an asynchronous request to the database and passes the retrieved data to the specified callback function.

Syntax

[_key, _function, _call, _netId] call ramdb_db_fnc_get

Parameters

ParameterTypeDescription
_keyStringName of the stored key to retrieve from the database
_functionStringName of the function to call when data is retrieved
_callBooleanWhether to call the function directly (true) or spawn (false)
_netIdString(Optional) NetID of the player to whom the data should be returned

Return Value

None. When data is retrieved, it will be passed to the specified function. The operation runs asynchronously.

Examples

Retrieve data in singleplayer or on the server:

[getPlayerUID player, "ramdb_db_fnc_test"] call ramdb_db_fnc_get;

Retrieve data on the server and send to a specific client:

[getPlayerUID player, "ramdb_db_fnc_test", false, netId player] remoteExecCall ["ramdb_db_fnc_get", 2, false];

Notes

  • The function exit with an error if the key or function parameters are empty
  • Data is processed through the scheduler system, which manages callback responses
  • For large data that exceeds buffer limits, it will be automatically chunked and reassembled
  • The callback function must be defined to accept the retrieved data
  • The _call parameter determines whether the callback is executed directly or spawned in a separate thread

Delete Key | Fetch Key | Get Key | Load DB | Save DB | Set Key