Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

[BUG] Missing attribute breaks rolls even with &{noerror} flag...

I would like to create a set of universal macros I can use regardless of which character sheet the DM/GM uses, but the following does not fail gracefully when any one of the attributes in the roll do not exist. [[ 1d20 + [[0 + {@{dex}, @{dexerity}, @{dex-mod}}KH1 ]] &{noerror}]] It shows up in chat as Rolling 1d20 + 0 = (8) + 0 regardless of the actual value of those attributes unless all of them exist on the character sheet.
It would be nice if that worked. Got any spare votes? <a href="https://app.roll20.net/forum/post/3006208/macro-friendly-parsing-of-unfound-attributes-and-abilities/" rel="nofollow">https://app.roll20.net/forum/post/3006208/macro-friendly-parsing-of-unfound-attributes-and-abilities/</a>
Eh, seems more like a bug to be fixed than something that requires a suggestion to be implemented.
To clarify, the &{noerror} flag just hides error messages, but the formula still has to work out to something valid to roll correctly. &{noerror} doesn't mean "magically fix invalid syntax to make it work." In your example above, if for example @{dex} is not found, it will break the roll because it will sub in either an empty space or the word "dex" (depending on if the attribute exists at all or is just set to blank). Which would lead to putting an empty string or the word "dex" where the formula requires a number. Since what you're asking is not an error in the implementation of the &{noerror} option, but rather that you want it to do something it's not designed to do, this would indeed be a suggestion, not a bug.