ds_list_add

Adds the given value (or values) to the end of the list.

Syntax:

GML Code Example

ds_list_add(id, val1 [, val2, ... val15]);


Argument Description
id The id of the list to add to.
val The value to add to the list.
[val2, ... val15] Optional values to be added to the list.


Returns: N/A


Description

This function can be used to add a new value (real or string) to the list, which will be added on at the end. The function can take a further 14 optional arguments (making a total of 15 possible additions), permitting you to add multiple values consecutively to the list in a single call.


Example:

GML Code Example

ds_list_add(sc_list, score);

The above code will add the value stored in the "score" variable into the list indexed in the variable "sc_list".


Back: DS Lists



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