ds_map_empty

This function will simply return false if the specified (previously created) DS map contains any key/value pairs, or true if it does not.

 

Syntax:

ds_map_empty(id);

ArgumentTypeDescription
idDS MapThe id of the data structure to check.

 

Returns:

Boolean

 

Example:

if (ds_map_empty(inventory))
{
    weight = 0;
}

The above code checks to see if the DS map indexed in the variable "inventory" has any key/value pairs and if it does not it sets the variable "weight" to 0.