I'm trying to debug some old macros that my buddy wrote. We have been using 1.4.0.5 for years, and are now upgrading to 1.5.14. I just noticed that the assignments to the variable "Result", are rendered in a bold font, and colored rust, unlike other assignments. In other words (something like):
[h: Result = if (Roll >= 18, Result + "<font color=red>CRITICAL HIT!</font>", Result)]
[h: macro.return = Result]
instead of:
[h: localResult = if (Roll >= 18, localResult + "<font color=red>CRITICAL HIT!</font>", localResult )]
[h: macro.return = localResult]
Why is this?
Why does "Result" get special rendering in macro editor?
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
Why does "Result" get special rendering in macro editor?
- Attachments
-
- rth_woes_00.txt
- (3.08 KiB) Downloaded 21 times
Re: Why does "Result" get special rendering in macro editor?
Result is a key word, used to only display the result of a roll. It is often abbreviated as "r".
Example:
Example:
displays "« 1 + 1 = 1 + 1 = 2 »", but[1 + 1]
displays 2.[result: 1 + 1]
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: Why does "Result" get special rendering in macro editor?
Thanks!
That makes me infer that "Result" is a poor choice as a variable identifier. Are there known issues with using key words as identifiers?
That makes me infer that "Result" is a poor choice as a variable identifier. Are there known issues with using key words as identifiers?
- metatheurgist
- Dragon
- Posts: 364
- Joined: Mon Oct 26, 2009 5:51 am
Re: Why does "Result" get special rendering in macro editor?
Yes, don't do it.Are there known issues with using key words as identifiers?