ds_list_replace

Replaces the value to any position in the list with a given other value.

Syntax:

GML Code Example

ds_list_replace(id, pos, val);


Argument Description
id The id of the list to change.
pos The position to replace the value, where 0 corresponds to the very beginning of the list and the final position is ds_list_size(id)-1.
val The new value to replace the given value with.


Returns: N/A


Description

This function will replace the value at the given position for another one.


Example:

GML Code Example

ds_list_replace(n_list, 3, name);

The above code will replace the value stored at position 3 in the list for that stored in the variable "name".





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