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

|max optional flag not working

I have been working with Scriptcards to create some scripts and I am at the point that I need to pull up a max value for the characters HPs.  In the 1st edition sheet, it is a optional (max) attribute. According to the macro section, I should be able to do something such as   @{target|hitpoints|max}, but this does not work.   So I went to test with the basics, and even this on a token gives me an error, even though it is directly out of the examples section in the Macros help @{target|bar1}  - this works and gives me the hps @{target|bar1|max} fails, saying  No attribute was found for @{TARGET:bar1|max} Did something change?  Can not figure out why an example right out of the help section is not working and I am lost on how to make it work. Thank you in advance
1674670715
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
When using the target syntax and a max attribute, you need to use the entire target syntax which is @{target|target name|attrname|max}
Thanks Scott.   So this is in the middle of a Scriptscard.  At this point in the script, the Target has already been selected.   If I do this as you wrote it, it asks me for the Target again.  Is there a way around that?    Thank you
1674673745
GiGs
Pro
Sheet Author
API Scripter
Try changing your other uses of target to use the same syntax: @{target|target name
Absolutely fantastic.. Thank you very much to the both of you