ds_list_find_value

Finds the value held at a given position in the list.

Syntax:

GML Code Example

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


Description

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.


Example:

GML Code Example

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


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