User:Verisimilar/Sandbox: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==Highlight Test== | ==Highlight Test== | ||
< | <syntaxhighlight lang="mtmacro" highlight="5" line> | ||
Function outside of the brackets: | Function outside of the brackets: | ||
defineFunction() | defineFunction() | ||
Line 28: | Line 28: | ||
[h; "This is a single quoted string" ] | [h; "This is a single quoted string" ] | ||
</ | </syntaxhighlight> | ||
==prop macros== | ==prop macros== | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
@onCampaignLoad | @onCampaignLoad | ||
[defineFunction("get", "get@this")] | [defineFunction("get", "get@this")] | ||
Line 51: | Line 51: | ||
[h: setProperty(arg(0), arg(1))] | [h: setProperty(arg(0), arg(1))] | ||
[h, macro.return = 1] | [h, macro.return = 1] | ||
</ | </syntaxhighlight> |
Latest revision as of 17:00, 13 March 2023
Highlight Test
Function outside of the brackets:
defineFunction()
Function within square brackets:
[assert()]
Function within curly brackets:
{abort(0)}
Roll options:
[h: abort(0)]
[t: abort(0)]
[e,if(0): ]
[macro(): ]
[token(): ]
Numbers:
[h: 1 2 34 567 ]
Symbols:
[h: > = ! & / : ; ]
Strings:
[h: "This is a double quoted string" ]
[h; "This is a single quoted string" ]
prop macros
@onCampaignLoad
[defineFunction("get", "get@this")]
@get
[h: checkProp = json.contains(getPropertyNames('json'), arg(0))]
[h,assert(checkProp, '<b>ERROR:</b> get("'+arg(0)+'") '+
'- That property does not exist.', 0)]
[h, macro.return = getProperty(arg(0))]
@onCampaignLoad
[defineFunction("set", "set@this")]
@set
[h: checkProp = json.contains(getPropertyNames('json'), arg(0))]
[h,assert(checkProp, '<b>ERROR:</b> set('+arg(0)+', '+arg(1)+') '+
'- That property does not exist.', 0)]
[h: setProperty(arg(0), arg(1))]
[h, macro.return = 1]