Garry's Mod Wiki

Garry's Mod Wiki

  table.SortDesc( table tbl )

Description

Sorts a table in reverse order from table.sort.

This function modifies the table you give to it. Like table.sort, it does not return anything.

Arguments

1 table tbl
The table to sort in descending order.

Example

local tbl = { 20, 10, 50, 30, 40, } table.SortDesc(tbl) PrintTable(tbl)
Output:
1 = 50 2 = 40 3 = 30 4 = 20 5 = 10

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...