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

Hero Tracker API script not adding tokens to initiative order

Running the Hero Tracker API script on a selected character token is now returning the error message:  token is not on the player page I'm preparing to run a Champions game, so I started gathering character sheets and useful scripts, with this being on of the first I added.  The weekend before last (Feb 3&4) I managed to get the script working to add tokens connected to the Hero System 6e Heroic sheet.  Last weekend (Feb 10&11) it would no longer add tokens, although adding from tags still works.  I have made a work around using macros and tags, so this is not an urgent issue. But the workaround has some limitations, and if I don't let someone know, this won't get fixed.  I had some other problems initially, the error messages and help command were not writing to the chat log. This made it hard to get working, since there was no indication of what the problem was when it didn't work. But this morning error messages started appearing in the chat log again, so now I know why it's failing.  One other problem I have with the script is that it doesn't allow spaces in tags. But this is only a issue while I need to use the work-around, it means I have to remove all spaces from the character names.
1707853138
The Aaron
Roll20 Production Team
API Scripter
If I had to guess, I'd say the script is looking at the player ribbon page and isn't finding a token for that character.  Do you have a link to the script?
It is the same script that you fixed in this thread:&nbsp; <a href="https://app.roll20.net/forum/post/10669130/hero-tracker-api-script-not-adding-tokens-to-initiative-order/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/10669130/hero-tracker-api-script-not-adding-tokens-to-initiative-order/?pagenum=1</a> Found the git repository:&nbsp; <a href="https://github.com/Roll20/roll20-api-scripts/tree/master/HeroTracker" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/tree/master/HeroTracker</a>
Currently all the characters are set to be in all players journals and to be editable by any player. I'm still setting things up...
1707868630
The Aaron
Roll20 Production Team
API Scripter
Ok.&nbsp; I've looked at the code.&nbsp; This happens when the token you've selected or provided an ID for is not on the page that the player ribbon is on.&nbsp; &nbsp;The easiest "fix" for this is to only use it on tokens on the player ribbon page. That may not be ideal if you're splitting the party, or testing the script. The full fix would require some rewrite...
Thanks for checking it out. Limiting it to the map with the player ribbon will not be a problem at all. Thanks very much for your help!
1707921964
The Aaron
Roll20 Production Team
API Scripter
Happy to help! &nbsp;Glad that works for you!