ds_list_replace

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

Syntax:

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:

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".


Back: DS Lists
Next: ds_list_shuffle
© Copyright YoYo Games Ltd. 2018 All Rights Reserved