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

Powercards and setattr question

This command (inside a powercard) does not seem to work: api_setattr| _mod _charid @{character_id} _AP|[[(4+2)]] I get the following error message: Attribute AP is not number-valued for character Iacrip Ekro. Attribute left unchanged. It seems to work if I just use this command in chat though: !setattr --mod --charid @{selected|character_id} --AP|[[(4+2)]] Any idea why?
I'm trying to make a powercards command that changes health on someone, and I've been able to do it using the setattr api, kinda. The problem is, I'm unable to use any logic when it comes through the power card. For instance  api_setattr| _mod _charid @{character_id} _AP|[[(4+2)]] doesn't work but !setattr --mod --charid @{selected|character_id} --AP|[[(4+2)]] works I've been able to make the setattr api work from powercards (For instance, removing the brackets and leaving just the 4 works fine), I just haven't been able to pass a formula through which I kinda need for this to work. Anyone knows what might be interfering or know of another api that can change an attribute from within a powercard without requiring a tokenid?
1584320790
Gen Kitty
Forum Champion
Powercards and setattr are two different scripts.  Each have to be invoked separately.