getTablePicksLeft: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=getTablePicksLeft |version=1.6.0 |trusted=true |description= Returns the number of ''picks'', i.e. entries, in a table that have not been chosen. The in...")
 
m (Text replacement - "source>" to "syntaxhighlight>")
 
(4 intermediate revisions by 2 users not shown)
Line 6: Line 6:
Returns the number of ''picks'', i.e. entries, in a table that have not been chosen.  The individual entries in a ''Pick Once'' table can only be randomly chosen once until the table is reset.
Returns the number of ''picks'', i.e. entries, in a table that have not been chosen.  The individual entries in a ''Pick Once'' table can only be randomly chosen once until the table is reset.
|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getTablePicksLeft(tableName)
getTablePicksLeft(tableName)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|tableName|A string containing the name of the Table.}}
{{param|tableName|A string containing the name of the Table.}}
|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r:getTablePicksLeft("Poker Deck")]
[r:getTablePicksLeft("Poker Deck")]
</source>
</syntaxhighlight>
'''Result:''' Returns the number of entries in the table that have not been chosen.
'''Result:''' Returns the number of entries in the table that have not been chosen.
|also=
|also=

Latest revision as of 23:59, 14 March 2023

getTablePicksLeft() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.6.0
Returns the number of picks, i.e. entries, in a table that have not been chosen. The individual entries in a Pick Once table can only be randomly chosen once until the table is reset.

Usage

getTablePicksLeft(tableName)

Parameters

  • tableName - A string containing the name of the Table.

Examples

[r:getTablePicksLeft("Poker Deck")]
Result: Returns the number of entries in the table that have not been chosen.

See Also