Skip to content

MAP_get_ptr_val

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_val(Map:map, key)

Example

new Map:map, Pointer:ptr;
MAP_insert_val_str(map, 1, "This is a test.");
ptr = MAP_get_ptr_val(map, 1);
if (ptr == MEM_NULLPTR)
{
	print("Value not found.");
}
else
{
	printf("Value pointer: 0x%x", _:ptr);
	printf("Value size: %d", MEM_get_size(ptr));
}