setMapName: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=setMapName |version=1.4.0.1 |description= Changes the name of a specified map. May only be used by a trusted macro. |usage= <source lang="mtmacro" line>...")
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
|name=setMapName
|name=setMapName
|version=1.4.0.1
|version=1.4.0.1
|trusted=true
|description=
|description=
Changes the name of a specified map. May only be used by a trusted macro.
Changes the name of a specified map.
|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
setMapName(oldMapName, newMapName)
setMapName(oldMapName, newMapName)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|oldMapName|String specifying the current name of the map you wish to rename.}}
{{param|oldMapName|String specifying the current name of the map you wish to rename.}}
{{param|newMapName|A string containing the name to which you want it changed.}}
{{param|newMapName|A string containing the name to which you want it changed.}}
|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r:setMapName("Grasslands","Map1")]
[r:setMapName("Grasslands","Map1")]
</source>
</syntaxhighlight>
|also=
[[table (function)|table()]]
}}
}}
[[Category:Table Function]]
[[Category:Map Function]]

Latest revision as of 20:50, 14 March 2023

setMapName() Function

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

Introduced in version 1.4.0.1
Changes the name of a specified map.

Usage

setMapName(oldMapName, newMapName)

Parameters

  • oldMapName - String specifying the current name of the map you wish to rename.
  • newMapName - A string containing the name to which you want it changed.

Examples

[r:setMapName("Grasslands","Map1")]