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

APIs don't always load or work?

1620425940

Edited 1620426161
New GM here and trying to get my module ready for play.  I'm learning the APIs, but it seems like they just don't load some of the time.  I spent almost an hour yesterday troubleshooting a Long Rest Macro that uses 5e Companion and ChatSetAttr.  But nothing was resetting.  I tried Spell Tracking, nothing was working.  I finally did a quick test with !5estatus and nothing showed up in chat and I figured out that the API wasn't working at all.  In fact, none of the APIs were loaded and working.  A few hours later, I came back, loaded up the game and everything was lworking fine.  Today, I loaded up the game and they aren't working again.  Any idea what is going on?  Is it something I am doing (or not doing)?  Is the API system really this unstable?
You want to keep the API page open in a separate tab from your game. The API sandbox can crash from time to time so all you have to do is reset it when commands aren’t working. It won’t reset automatically in case there’s some fatal error occurring and you have to disable the script that is causing issues first. All of the scripts you find in the one-click library will be very stable, but they can still cause issues from time to time, especially if they are doing conflicting things. And scripts that you create yourself or find elsewhere may have more complications. 
OK, thanks.  It wasn't clear to me that I needed to have the API page opened first in another tab before launching the game.  I tried that last night and APIs worked again.  Brilliant!  I guess I just thought they ran automatically when you added them to the game.
1620484014
timmaugh
Pro
API Scripter
They do... but the point is they sometimes break. Or the sandbox goes stale. Either way, you sometimes have to restart the sandbox. It's easy enough to spot an error if you have the sandbox up in a second window because you get the PBD*. Another option, especially if you don't have a second monitor, is to have an API Heartbeat script running in your game. (There's one in the one-click.) That will give you a visual indicator that the sandbox is in the "train keep a rollin', all night long" state. =D * - P ink B ox of D oom