Garry's Mod Wiki

SortedPairsByValue

function, table SortedPairsByValue( table table, boolean descending = false )

Description

Returns an iterator function that can be used to loop through a table in order of its values.

To sort by specific value member, use SortedPairsByMemberValue.

To sort by keys, use SortedPairs.

Arguments

1 table table
Table to create iterator for
2 boolean descending = false
Whether the iterator should iterate in descending order or not

Returns

1 function
Iterator function
2 table
The table which will be iterated over

Page Links


Special Pages


Wikis

?

Render Time: 31ms

Session 0
DB GetPage 3
Generate Html 8
SaveChanges 12
Render Body 0
Render Sidebar 6