ds_list_delete

Deletes the value at a given position in the list.

Syntax:

GML Code Example

ds_list_delete(id, pos);


Argument Description
id The id of the list to change.
pos Where in the list to delete the value.


Returns: N/A


Description

With this function you can remove the value stored at a specific position within the list.


Example:

GML Code Example

if ds_list_size(sc_list)>10
    {
    while (ds_list_size(sc_list) > 10)
       {
       ds_list_delete(sc_list, 0);
       }
    }
 

The above code checks the size of a ds_list and if it is larger than ten, it loops through the list removing the top value (position 0) until the list has only 10 entries.





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