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

API Not Working

Can someone take a look at this API and let me know if it is done correctly? When I run it, nothing happens. Yes the token is selected and assigned to a character. Trying to auto-update new tokens to appropriate values. Thanks in adavance. !token-mod {{ --set bar1_link|hp --set bar2_link|ac --set bar3_link|passive_wisdom --set name|@{selected|character_name} --off showplayers_bar1 --off showplayers_bar2 --off showplayers_aura1 --off showplayers_aura2 --on light_hassight --set light_radius|60 --off light_otherplayers }}
That command looks good to me. Double check that your API Output Console is running and not throwing any errors.  (The screen where you load scripts outside of the game.) Click on the Restart API Sandbox button just to make sure, then try the command again. I'd also suggest loading the APIHeartbeat script if you don't have it yet to see a nice visual reminder in game that your scripts are running.
1595516972
The Aaron
Roll20 Production Team
API Scripter
It's possible there's something in the character name that's causing an issue.  Try this version: !token-mod {{ --off light_otherplayers showplayers_aura1 showplayers_aura2 showplayers_bar1 showplayers_bar2 --on light_hassight --set bar1_link|hp bar2_link|ac bar3_link|passive_wisdom light_radius|60 name|"@{selected|character_name}" }} For API Commands, it's often useful to debug by taking the ! off the front and looking at how all the arguments are expanded.  Running a command that has output (!token-mod --help) or having a script with visual feedback can also help you know the API is working.
I will try it. Thanks for your help