
To clarify, I would like to create an equation that references an attribute which a character may or may not have.
- If the character does have the attribute, then it should add the attribute value into the equation,
- if the character does not have the attribute, then it should ignore it and parse the equation as if the attribute was zero or not called at all.
For Example
[[@{selected|strength} + @{selected|dexterity} + @{selected|boost}]]
- All characters have the attributes dexterity and strength.
- Hansel has the attribute boost
- Gretel does not have the attribute boost.
When Hansel is selected and the macro is run the result should be the sum of the attributes "strength + dexterity + boost"
When Gretel is selected and the same macro is run, the result should be the sum of the attributes "strength + dexterity + 0" or perhaps just "strength + dexterity"
However
When I run the macro for Hansel it works, but when I run it for Gretel it just gives me the "No Attribute Found" error and does not return a result.
Any Ideas how I can get the macro to ignore not finding an attribute and run the way I described in the examples?
Thank you.