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/Tracker API Assistance Requested

1448725424

Edited 1448744015
Okay guys, I am in the process of creating a character sheet for a game in development. I am trying to use the modified "AMMO" API renamed "TRACKER" to change whatever value is selected in the dropdown. Does anyone know how I can manipulate the API to do this? As of right now, I have been experimenting with this: !tracker @{test1|character_id} rangedloaded1 -1 Here is the error I get: Ignoring warnings and applying adjustment anyway. Was: 0/10000 Now: -1/10000 So, with the above error it changes the rangedloaded1 value but not what I have selected in the drop down list. I need it to update what is selected such as the value mag_qty_1. Here is my dropdown: <select name="attr_rangedloaded1"> <option value="@{mag_qty_1}">Magazine 1</option> <option value="@{mag_qty_2}">Magazine 2</option> <option value="@{mag_qty_3}">Magazine 3</option> <option value="@{mag_qty_4}">Magazine 4</option> <option value="@{mag_qty_5}">Magazine 5</option> <option value="@{mag_qty_6}">Magazine 6</option> <option value="@{mag_qty_7}">Magazine 7</option> <option value="@{mag_qty_8}">Magazine 8</option> <option value="@{mag_qty_9}">Magazine 9</option> <option value="@{mag_qty_10}">Magazine 10</option> <option value="@{quiver_qty_1}">Quiver 1</option> <option value="@{quiver_qty_2}">Quiver 2</option> </select> Getting the correct value to change is the first step. The next step is a bit more difficult which is finding a way to get the API command to work in the Roll Template. Baby steps though, baby steps. Any help would be greatly appreciated. Also, sorry for the sloppy formatting of my post.
1448737459
The Aaron
Pro
API Scripter
try: !tracker  @{test1|character_id} @{rangedloaded1} -1
1448742646

Edited 1448742762
It says, "no character was found for rangedloaded1"
How about !tracker @{test1|character_id} @{test1|rangedloaded1} -1
1448743152

Edited 1448743274
Update: apparently there were two spaces after tracker. It gives me the error, "Attribute -1 was not found. Please verify that you have the right name."
1448743490

Edited 1448743920
Silvyre said: How about !tracker @{test1|character_id} @{test1|rangedloaded1} -1 Attribute [6] was not found. Please verify that you have the right name. 6 is actually the value that mag_qty_1 is set too and when I changed the value of mag_qty_1 it shows "7" in the error. It's reading the value now, but it refuses to update it.
<input min="0" max="100" name="attr_mag_qty_1" type="number">