Skip to content

MAP_get_ptr_arr

BigETI edited this page May 4, 2018 · 1 revision

Description

Map get pointer (key[])

Returns

Pointer of the value, otherwise MEM_NULLPTR

Syntax

Pointer:MAP_get_ptr_arr(Map:map, const key[], key_size = sizeof key)

Example

new Map:map, arr[10] = { 100, ... }, Pointer:ptr;
MAP_insert_arr_str(map, arr, _, "This is a test.");
ptr = MAP_get_ptr_arr(map, arr);
if (ptr == MEM_NULLPTR)
{
	print("Value not found.");
}
else
{
	printf("Value pointer: 0x%x", _:ptr);
	printf("Value size: %d", MEM_get_size(ptr));
}