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-API what am I noobishly doing wrong?

Hello there, I wanted to implement The Aaron's API-Script to my campaign, saved it, found out the tokens id and filled in the other specifications (Pfeil = arrow) and created an attribute to that particular token named "Pfeile" with 20/20 amount. !ammo @{-M5Wv2q08J1k8U6TXLLs} Pfeile -1 Pfeil However the return message has been TypeError: c is undefined . I am using a custom sheet if that matters. What am I doing wrong? Thanks in advance for any help! :)
1587562043
The Aaron
Roll20 Production Team
API Scripter
Hmm. Is that a token id or a character id? Try: !ammo -M5Wv2q08J1k8U6TXLLs Pfeile -1 Pfeil The @{ } is only used for expanding attributes or abstractly referencing tokens and characters.
Heureka, it works! Thank you so much for your fast response! :)
1587562747
The Aaron
Roll20 Production Team
API Scripter
No problem! =D
Sorry, one more question: Is it possible that I as gm control the refill of arrows via macro by just selecting a player token and then give the command to refill arrows to max? I tried the following of your example commands as a macro, but was not successful (Geschoss = projectile): !ammo @{selected|character} Geschosse [[@{selected|Geschosse|max}-@{selected|Geschosse}]]
Nevermind, found my mistake ;)
1587570013
The Aaron
Roll20 Production Team
API Scripter
Great!