SortedPairsByValue

From Garry's Mod
Jump to: navigation, search
 SortedPairsByValue( )

Contents

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

table table

Table to create iterator for

Arguments

boolean descending=false

Whether the iterator should iterate in descending order or not

Returns

function

Iterator function

Returns

table

The table which will be iterated over
Personal tools
Navigation