getVisibleMapNames: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page GetVisibleMapNames to getVisibleMapNames: Converting page titles to lowercase) |
m (Text replacement - "source>" to "syntaxhighlight>") |
||
Line 8: | Line 8: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
getVisibleMapNames() | getVisibleMapNames() | ||
</ | </syntaxhighlight> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
getVisibleMapNames(delim) | getVisibleMapNames(delim) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|delim|The delimiter to use for the [[String List]]. If the value is {{code|json}} then a [[JSON Array]] is returned.}} | {{param|delim|The delimiter to use for the [[String List]]. If the value is {{code|json}} then a [[JSON Array]] is returned.}} | ||
Line 19: | Line 19: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: maps = getVisibleMapNames()] | [h: maps = getVisibleMapNames()] | ||
</ | </syntaxhighlight> | ||
To get the names of all of the player visible maps in a [[JSON Array]] | To get the names of all of the player visible maps in a [[JSON Array]] | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: maps = getVisibleMapNames("json")] | [h: maps = getVisibleMapNames("json")] | ||
</ | </syntaxhighlight> | ||
|also= | |also= | ||
{{func|getCurrentMapName}} {{func|getAllMapNames}} | {{func|getCurrentMapName}} {{func|getAllMapNames}} |
Revision as of 20:29, 14 March 2023
getVisibleMapNames() Function
• Introduced in version 1.3b55
Returns the names of all of the player visible maps as either a String List or JSON Array.
Usage
<source lang="mtmacro" line> getVisibleMapNames() </syntaxhighlight> <source lang="mtmacro" line> getVisibleMapNames(delim) </syntaxhighlight> 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 player visible maps in a String List.
<source lang="mtmacro" line> [h: maps = getVisibleMapNames()] </syntaxhighlight>
To get the names of all of the player visible maps in a JSON Array <source lang="mtmacro" line> [h: maps = getVisibleMapNames("json")]
</syntaxhighlight>