ds_list_delete

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

 

Syntax:

ds_list_delete(id, pos);

ArgumentTypeDescription
idDS ListThe id of the list to change.
posRealWhere in the list to delete the value.

 

Returns:

N/A

 

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.