ds_list_sort


Description

With this function you can sort all the values within a list, either in ascending or descending order. If the list contains strings, these will be sorted alphabetically, based on the English 26 letter alphabet.


Syntax:

ds_list_sort(id, ascend);

Argument Description
id The id of the list to sort.
ascend Whether the values should be ascending (true) or descending (false) order.


Returns:

N/A


Example:

if newgame
    {
    ds_list_sort(name_list, true);
    }

The above code will sort the list indexed in the variable "name_list" if the variable "newgame" is flagged as true.