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

PowerCard bug ?

1614182557

Edited 1614182649
JPL
Pro
I have the following code : --?? $HITADD > 0 ?? api_aura*05|updatetarget @{target|token_id} -[^HITADD]  updatetarget is a specific code i do for aura to be able to update specifically one target and see the nice FX even if i automaticaly update the attribute through api that does not trigger info to aura script. The token_id i have the issue has the value : -MUJ2wBS-_Sqx3SnFvGn When i receive the msg in aura script, i have : !aura updatetarget -MUJ2wBS- --Sqx3SnFvGn -4","playerid":"API"... So the _ is replaced by <space> + <-->, which make sense as it is a protection for the minus minus string within powercard, but what does not make sense is that it is in the middle of a string that the replacement occurs. Where, I think, a correct behavior should be to only replace _ by <space minus minus> when there is a space before the undesrcore, at a start of keyword. Otherwise any variable with an undesrcore in it is at risk also no ?
For info also, i directly replace space-- in aura script with _ and evrything works well again after, so I really think the issue is in powercard replacement strings
1614620451

Edited 1614620635
--api_ The only thing I can think of is what your getting at, the replacement happens after the API has already been sent a instruction, so -[^HITADD] may not contain any value to subtract (never mind, I see the -4). I wish I could be more help! From the powercards wiki - This special tag starts with “--api_” followed by the command to call an API script. The content of the tag is passed to the API script after replacing underscores (_) with two dashes (--). Example: --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|blue