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

Target + Max Syntax Error

1475165131

Edited 1475165161
Jedd
KS Backer
Marketplace Creator
FYI, if one tries to find the max value of an attribute belonging to target token, you'll get a syntax error. Instead of writing @{target|hp|max}, write @{target|target|hp|max}. The problem is the target function sees three values and thinks it follows a @{target|"Target Name"|"Attribute Name"} progression instead of @{target|"Attribute Name"|max} (since there is no attribute named "max"). I don't know if anyone else has run into this, but I couldn't find a solution via a search, so I thought I'd post one once I figured out what was going on.
1475172382

Edited 1475172682
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, it's noted in the advanced usage part of the  Using a Targeted Token with a Macro wiki entry . Could probably be made more apparent by noting this in the major differences blurb in the section. EDIT: Wiki updated to note that there is a difference in the calling of max attributes with the target keyword.