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

[Help] ChatSetAttr—Command being cut off after vertical bar

1578944827

Edited 1578947906
I'm trying to fill an attribute using the following command: !setattr --sel --replace --repeating_attacks_-create_atkmod|1[MWK]~<<{(floor((1~(floor(((`{hp}~1)/`{hp|max})*4)/4))*3)),3}kl1>>[WND]~<<ceil((;{Distance to target; (max 1100 ft)|5}~110) / 110) * 2>>[RPEN] but this is all that gets through: 1[MWK]-[[{(floor((1-(floor(((@{hp}-1)/@{hp The chat log shows this: I've tried replacing the '|' with '#', '/', and '|'—none of them seem to work. Is there another character I can substitute or a different way I can write out the @{hp|max} attribute that doesn't interfere with the API command? ( Related Issue , but doesn't deal with API directly)
1578947127
The Aaron
Roll20 Production Team
API Scripter
See if wrapping the value in " " works. It might be something that needs to be fixed in ChatSetAttr to provide a way to escape | in a value, rather  than treating it as a command. 
Oh, escaping, of course! The " " didn't work, but idk why I didn't think to try escaping it with `{hp\|max}. That's what it needed. Thanks, Aaron!
1578955460
The Aaron
Roll20 Production Team
API Scripter
Sweet!!