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 TheAaron) doesn't take repeated_RESOURCES?

Hi! I try to fill the <ammo> parameter in the !ammo script with a resource. Actually, it is @{repeating_resource_$0_left_name} - but the script always says that such an attribute (WOT?) does not exist. I also tried some other things (e.g. without "@{}"), after typing the real name first (TheAaron wrote here   that multi-word names are possible, but he just showed an example where the optional <resource name> is a multi-word.), but that didn't work out neither. Any suggestions?
1591889185
The Aaron
Roll20 Production Team
API Scripter
Can you post the command you're running?
I try to remember it, just have my cellphone here .... !ammo @{selected|token_id} Channel Divinity (SR) -1 Channel Divinity "Channel Divinity (SR)" is the name of repeated_resource_$0_left (or something similar); the left resource in the second row ;-)
1591932371
The Aaron
Roll20 Production Team
API Scripter
It's the name of the attribute, not the name you've assigned to the resource.  Try this: !ammo @{selected|character_id} repeating_resource_$0_resource_left -1 @{repeating_resource_$0_resource_left_name
1591946482

Edited 1591947362
I was so sure to have tested this before as well ... THANK YOU! Another question, I have seen someone else put it already, but I didn't got the answer: The message about the current amount of resource is coming from "ammo". Can this be changed to the player's name (or token's name)? But that is not a request, because the content of the message mentions who this is about, it's just for visual reasons.
1591969911
The Aaron
Roll20 Production Team
API Scripter
That's a good suggestion, I've implemented it.&nbsp; It will be in the 1-click next week or you can grab the latest copy from my repo if you'd like:&nbsp;&nbsp;<a href="https://github.com/shdwjk/Roll20API/blob/master/Ammo/Ammo.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Ammo/Ammo.js</a>