73 lines
2.5 KiB
Markdown
73 lines
2.5 KiB
Markdown
---
|
|
title: ArmaRAMDb - Hash Remove ID
|
|
icon: mdi:file-text-outline
|
|
excerpt: Remove a field from a specific hash table.
|
|
---
|
|
|
|
# ramdb_db_fnc_hashRemoveId
|
|
|
|
## Description
|
|
Removes a specific field from a specific hash table identified by its key. This function deletes a single field and its associated value from a targeted hash table without affecting other fields. It's ideal for managing player-specific or entity-specific data when only certain attributes need to be removed.
|
|
|
|
## Syntax
|
|
```sqf
|
|
[_key, _keyField] call ramdb_db_fnc_hashRemoveId
|
|
```
|
|
|
|
## Parameters
|
|
| Parameter | Type | Description | Default |
|
|
|-------------|--------|----------------------------------------------|---------|
|
|
| `_key` | String | Identifier of the hash table | "" |
|
|
| `_keyField` | String | Name of the field in the hash to be removed | "" |
|
|
|
|
## Return Value
|
|
None. The operation runs synchronously to remove the field.
|
|
|
|
## Examples
|
|
### Remove a player's loadout field:
|
|
```sqf
|
|
[getPlayerUID player, "loadout"] call ramdb_db_fnc_hashRemoveId;
|
|
```
|
|
|
|
### Remove a vehicle property:
|
|
```sqf
|
|
["vehicle_123", "cargo"] call ramdb_db_fnc_hashRemoveId;
|
|
```
|
|
|
|
### Remove a field remotely:
|
|
```sqf
|
|
[getPlayerUID player, "stats"] remoteExecCall ["ramdb_db_fnc_hashRemoveId", 2, false];
|
|
```
|
|
|
|
## Notes
|
|
- Removes a single field from a specific hash table identified by `_key`
|
|
- Both the key and key field parameters are required and validated
|
|
- Does not affect other fields in the hash table
|
|
- If the hash table or field doesn't exist, the operation has no effect
|
|
- Player UIDs are commonly used as keys to identify player-specific hash tables
|
|
- The operation is executed immediately and synchronously
|
|
- All operations are logged for debugging purposes
|
|
|
|
## Related Functions
|
|
- `ramdb_db_fnc_hashRemove`: Removes a specific field from the global hash table
|
|
- `ramdb_db_fnc_hashDeleteId`: Removes an entire specific hash table
|
|
- `ramdb_db_fnc_hashDelete`: Removes all hash tables
|
|
- `ramdb_db_fnc_hashSetId`: Sets a field value in a specific hash table
|
|
- `ramdb_db_fnc_hashGetId`: Retrieves a field value from a specific hash table
|
|
|
|
## Links
|
|
|
|
[Hash Delete](hashDelete) |
|
|
[Hash Delete Field](hashDeleteField) |
|
|
[Hash Delete ID](hashDeleteId) |
|
|
[Hash Get](hashGet) |
|
|
[Hash Get All](hashGetAll) |
|
|
[Hash Get All ID](hashGetAllId) |
|
|
[Hash Get ID](hashGetId) |
|
|
[Hash Remove](hashRemove) |
|
|
[Hash Remove ID](hashRemoveId) |
|
|
[Hash Set](hashSet) |
|
|
[Hash Set Bulk](hashSetBulk) |
|
|
[Hash Set ID](hashSetId) |
|
|
[Hash Set ID Bulk](hashSetIdBulk)
|