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

Macro calling an API

1705765237

Edited 1705765266
I tried searching but was unable to find an answer. I have an API i am building for Aces and Eights that will return the hit location damage results based on the API parameters. For example i call !a8_dam Foot 3 and the API returns Sprinting not (will expand text later :) ) this part is working fine but now i want to make an Macro so i don't have to remember the proper names in the API for all of the locations like Thigh_Gunshot. This is what i have so far but it crashes the API, is something like this even feasible. ! ?{Location|Foot|Ankle|Knee|Thigh_Gunshot|Thigh_Slashing|Thigh _Piercing|Thigh_Bludgeoning} ?{Damage|2|3|4|5|6|7} !a8_dam ?{Location}  ?{Damage} Thanks for any help Dean
If you put '!a8_dam Foot 3' into chat, does it work with your script? If so, then your query should work also if you select 'Foot' and '3' for the two queries. But it really depends on your script code.  It looks like you have two spaces between ?{Location} and ?{Damage} here so you'd need to make sure your script would separate the items if there are two spaces and not a single space. Post your full script code and someone might be able to help.
Thanks, that was it. I removed the extra space and the Macro calls the API just fine.