Advertisement 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
Forum Champion
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
Forum Champion
API Scripter
Sweet!!