ds_list_find_value(id, pos);
Argument | Description |
---|---|
id | The id of the list to use. |
pos | The position to look at, where 0 corresponds to the very beginning of the list and the final position is ds_list_size(id)-1. |
Returns: Real, String or Undefined
With this function you can check the given list position and the value held within the list for that position will be returned.
NOTE: If you give a position that is outside of the given list size (ie: position 11 in a 10 value list) then the function will return <undefined>. You should always check this using the
is_undefined() function.
val = ds_list_find_value(list, ds_list_size(list) - 1);
The above code checks the list indexed in the variable "list" at the last position in the list and stores the returned value in the variable "val".