getTableNames: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
getTableNames() | getTableNames() | ||
getTableNames(delim) | |||
</source> | </source> | ||
If {{code|delim}} is specified then it is used to separate the values in the list; if it is not specified then it defaults to "{{code|,}}". When {{code|delim}} is the string "{{code|json}}" the return value will be in the form of a [[JSON Array]]. | |||
|examples= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
getTableNames( | [r:getTableNames()] | ||
[r:getTableNames("<br>")] | |||
[r:getTableNames("json")] | |||
</source> | </source> | ||
|also= | |also= |
Revision as of 20:14, 2 May 2016
getTableNames() Function
• Introduced in version 1.4.0.1
Returns a list containing the names of the tables in the campaign. The type of the value returned depends on the delimiter parameter. The function can be used by players or from a non-trusted macro, but it will only return player-visible tables. When used by a GM or a trusted macro it returns all tables.
Usage
getTableNames()
getTableNames(delim)
If delim
is specified then it is used to separate the values in the list; if it is not specified then it defaults to ",
". When delim
is the string "json
" the return value will be in the form of a JSON Array.
Examples
[r:getTableNames()]
[r:getTableNames("<br>")]
[r:getTableNames("json")]