isOwner: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
m (Updated with recent version changes.)
Line 3: Line 3:
|version=1.3b48
|version=1.3b48
|description=
|description=
Returns 1 if the [[Player]] is and owner of the [[Token:Current Token|Current Token]].
Returns {{true}} if the [[Player]] is and owner of a specific [[Token]].


|usage=
|usage=
Line 9: Line 9:
isOwner()
isOwner()
</source>
</source>
 
<source lang="mtmacro" line>
isOwner(id)
</source>
'''Parameter'''
{{param|id|The token {{code|id}} of the token which is checked for ownership, defaults to the [[Current Token]]. {{TrustedParameter}} }}


|examples=
|examples=
Returns {{code|You can edit me.}} if the [[Current Token]] is owned by the [[Player]].
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r, if(isOwner()): "You can edit me."]
[r, if(isOwner()): "You can edit me."]
</source>
</source>
|also=
[[getOwners|getOwners()]],
[[isOwnedByAll|isOwnedByAll()]]
|changes=
{{change|1.3b51|Added {{code|id}} parameter option.}}
}}
}}
[[Category:Token Function]]
[[Category:Token Function]]

Revision as of 04:10, 31 March 2009

isOwner() Function

Introduced in version 1.3b48
Returns true(1) if the Player is and owner of a specific Token.

Usage

isOwner()
isOwner(id)

Parameter

  • id - The token id of the token which is checked for ownership, defaults to the Current Token.

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

Examples

Returns You can edit me. if the Current Token is owned by the Player.
[r, if(isOwner()): "You can edit me."]

See Also

Version Changes

  • 1.3b51 - Added id parameter option.