getAllMapDisplayNames: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page getAllMapDisplayNames to GetAllMapDisplayNames without leaving a redirect: Converting page title to first-letter uppercase)
m (Text replacement - "<source" to "<syntaxhighlight")
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getAllMapDisplayNames()
getAllMapDisplayNames()
getAllMapDisplayNames(delim)
getAllMapDisplayNames(delim)
</source>
</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 16: Line 16:
|examples=
|examples=
To get the display names of all of the maps in a [[String List]].
To get the display names of all of the maps in a [[String List]].
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: maps = getAllMapDisplayNames()]
[h: maps = getAllMapDisplayNames()]
</source>
</syntaxhighlight>


To get the display names of all of the maps in a [[JSON Array]]
To get the display names of all of the maps in a [[JSON Array]]
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: maps = getAllMapDisplayNames("json")]
[h: maps = getAllMapDisplayNames("json")]
</source>
</syntaxhighlight>
|also=
|also=
{{func|getMapDisplayName}} {{func|getVisibleMapDisplayNames}}
{{func|getMapDisplayName}} {{func|getVisibleMapDisplayNames}}

Latest revision as of 17:53, 14 March 2023

getAllMapDisplayNames() Function

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

Introduced in version 1.9.0
Returns the display names of all of the maps as either a String List or JSON Array.

Usage

getAllMapDisplayNames()
getAllMapDisplayNames(delim)

Parameters

Examples

To get the display names of all of the maps in a String List.
[h: maps = getAllMapDisplayNames()]

To get the display names of all of the maps in a JSON Array

[h: maps = getAllMapDisplayNames("json")]

See Also