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

[help] Newbie running into issues applying scripts!

Hey there! just updated to Pro and looking into API stuff, first thing i figured id play with is the ammo script,&nbsp; <a href="https://wiki.roll20.net/Script:Ammo" rel="nofollow">https://wiki.roll20.net/Script:Ammo</a> , I've tried using it, but i keep getting: "Attribute [Arrows] was not found. Please verify that you have the right name." I have no idea what to go about doing with that in order to fix it. I will say that for the roll i attempted to attach it to a macro in order (Shortbow attack) in order to make it work, which would look like: @{Sol|wtype}&{template:atk} {{mod=+6}} {{rname=[Shortbow](~-KqpCZLzpPC4D0UisOpr|repeating_attack_-KqpJHdfwm1NCxGM-T7F_attack_dmg)}} {{rnamec=[Shortbow](~-KqpCZLzpPC4D0UisOpr|repeating_attack_-KqpJHdfwm1NCxGM-T7F_attack_crit)}} {{r1=[[@{Sol|d20}cs&gt;20 + 3[DEX] + 3[PROF]]]}} @{Sol|rtype}cs&gt;20 + 3[DEX] + 3[PROF]]]}} {{range=}} {{desc=}} {{spelllevel=}} {{innate=}} @{Sol|global_attack_mod} ammo=arrows @{Sol|charname_output} !ammo @{character_id} arrows -1 The&nbsp;!ammo @{character_id} arrows -1 was provided by the api page, i have no idea how to go about troubleshooting and figuring out why its not working, and i cant find any information good for beginners using api scripts or where to start! thanks so much!
1526585074
The Aaron
Pro
API Scripter
The Ammo script (which predates Character Sheets, btw. =D) needs to know the character attribute you want to deduct from.&nbsp; That's the arrows parameter here: !ammo @{character_id} arrows -1 These are: !ammo [CHARACTER ID] [ATTRIBUTE NAME] [ADJUSTMENT] --[REPORTED NAME] So in your case, you'd need to check the Attributes and Abilities tab on the Character and make sure there is an Attribute there named arrows. If your character sheet already has a location for ammunition, you would need to extract the name of that attribute so that it could be used.&nbsp; If it's in a Repeating Group, it gets a little complicated, so let me know if you need to go down that route.
1526585160
The Aaron
Pro
API Scripter
Here's the latest post for that script:&nbsp; <a href="https://app.roll20.net/forum/post/4543180/script-u" rel="nofollow">https://app.roll20.net/forum/post/4543180/script-u</a>... It goes into some detail about the options.&nbsp; The wiki is likely out of date.