getVisibleMapNames: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: {{MacroFunction |name=getVisibleMapNames |version=1.3b55 |description= Returns the names of all of the player visible maps as either a String List or JSON Array. |usage= <source ...)
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(4 intermediate revisions by 3 users not shown)
Line 6: Line 6:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getVisibleMapNames()
getVisibleMapNames()
</source>
</syntaxhighlight>
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getVisibleMapNames(delim)
getVisibleMapNames(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 17: Line 17:
|examples=
|examples=
To get the names of all of the player visible maps in a [[String List]].
To get the names of all of the player visible maps in a [[String List]].
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: maps = getVisibleMapNames()]
[h: maps = getVisibleMapNames()]
</source>
</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>
<syntaxhighlight lang="mtmacro" line>
[h: maps = getVisibleMapNames("json")]
[h: maps = getVisibleMapNames("json")]
</source>
</syntaxhighlight>
|also=
|also=
{{func|getCurrentMapName}} {{func|getAllMapNames}}
{{func|getCurrentMapName}} {{func|getAllMapNames}}


}}
}}
[[Category:Miscellaneous Function]]
[[Category:Map Function]]

Latest revision as of 20:55, 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

getVisibleMapNames()
getVisibleMapNames(delim)

Parameters

Examples

To get the names of all of the player visible maps in a String List.
[h: maps = getVisibleMapNames()]

To get the names of all of the player visible maps in a JSON Array

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

See Also