isTrusted: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Function isTrusted==
{{MacroFunction
 
|name=isTrusted
|version=1.3b48
|description=
Returns 1 if this is running as a [[Macros:TrustedMacros|trusted macro]] or 0 if it is not.
Returns 1 if this is running as a [[Macros:TrustedMacros|trusted macro]] or 0 if it is not.


===Usage===
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: trusted = isTrusted()]
isTrusted()
</source>
</syntaxhighlight>
 


===Example===
|example=
[[Map:fog of war|fog of war]].
<syntaxhighlight lang="mtmacro" line>
<source lang="mtmacro" line>
[r, if(isTrusted()): "I can run the trusted functions! yay!"]
[r, if(isTrusted()): "I can run the trusted functions! yay!")]
</syntaxhighlight>
</source>
}}
[[Category:Metamacro Function]]
[[Category:Permission Function]]

Latest revision as of 20:13, 15 March 2023

isTrusted() Function

Introduced in version 1.3b48
Returns 1 if this is running as a trusted macro or 0 if it is not.

Usage

isTrusted()

Example

[r, if(isTrusted()): "I can run the trusted functions! yay!"]