ds_map_empty

Returns whether the given map is empty of key/value pairs or not.

Syntax:

GML Code Example

ds_map_empty(id);


Argument Description
id The id of the data structure to check.


Returns: Boolean.


Description

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


Example:

GML Code 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.


Back: DS Maps



No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here