ds_map_size

Returns the size of given ds_map.

Syntax:

GML Code Example

ds_map_size(id);


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


Returns: Real


Description

With this function you can find how many key/values pairs the (previously created) ds_map contains.


Example:

GML Code Example

if ds_map_size(inventory) > 49
    {
    full = true;
    }
 

The above code will check the size of the ds_map (ie: number of key/value pairs) and if it is greater than 49 it sets the variable "full" to true.





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