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

Ammo by The Aaron

I'm new to coding, and felt like I was getting a handle of using the API but I'm having problems making the Ammo script work.  Not sure if it makes a difference but I'm using the community contributed character sheet and this is my commands !ammo @{Traymere|inventoryqty1} Bolts -1 Bolt This is the error I get  Character/Token id [18] is not valid. Please be sure you are specifying it correctly, either with @{selected|token_id} or @{selected|character_id}. It's grabbing it from the right spot but for some reason it's not valid?
1620203397
Ziechael
Forum Champion
Sheet Author
API Scripter
You need to specify the character id first, as it stands you are specifying a row id as the character: !ammo <character_id/token_id> <attribute_name> <delta>  -- changes the attribute by the specified delta, bounds checked. @{Traymere|character_id} should get you the id you need...
Wow.... That did the trick! Thank you so much !!