getAllMapNames: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "source>" to "syntaxhighlight>") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getAllMapNames() | getAllMapNames() | ||
getAllMapNames(delim) | getAllMapNames(delim) | ||
Line 16: | Line 16: | ||
|examples= | |examples= | ||
To get the names of all of the maps in a [[String List]]. | To get the names of all of the maps in a [[String List]]. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: maps = getAllMapNames()] | [h: maps = getAllMapNames()] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To get the names of all of the maps in a [[JSON Array]] | To get the names of all of the maps in a [[JSON Array]] | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: maps = getAllMapNames("json")] | [h: maps = getAllMapNames("json")] | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 23:59, 14 March 2023
getAllMapNames() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b55
Returns the names of all of the maps as either a String List or JSON Array.
Usage
getAllMapNames()
getAllMapNames(delim)
Parameters
delim
- The delimiter to use for the String List. If the value isjson
then a JSON Array is returned.
Examples
To get the names of all of the maps in a String List.
[h: maps = getAllMapNames()]
To get the names of all of the maps in a JSON Array
[h: maps = getAllMapNames("json")]