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 just sometimes doesn't work???

Is there a reason that a working and tested script just stops working?  I used David M.'s idea for the Conjure Animal spell, set up all my tables, etc. and it was working wonderfully.  Logged in yesterday and..... #crickets.  I had to disable and reenable the Spawn script to get it to work again?
Was there an error in the API console? Also, sometimes the API will ‘silently’ fail without throwing an error. I’d suggest using the APIHeartbeat script, or using a simple API script to let you test when the API is not running.  If you ever suspect that the API is not functioning, just reset it. Resetting it won’t disrupt your game, other than momentarily not working while it’s resetting. 
1639959616
vÍnce
Pro
Sheet Author
You also might have a look at the APIHeartBeat script which can be used as an in-game visual indicator of the game's API status.
1639961484
David M.
Pro
API Scripter
I experienced a zombie sandbox a couple times during my Friday night game. API heartbeat was spinning away indicating sandbox was up, there were no errors in the api console, but no scripts worked (I tried several different ones). As Jarren said, restarting the sandbox fixed things, but it went dead (undead?) a couple more times that evening. 
1639961808
vÍnce
Pro
Sheet Author
David M. said: I experienced a zombie sandbox a couple times during my Friday night game. API heartbeat was spinning away indicating sandbox was up, there were no errors in the api console, but no scripts worked (I tried several different ones). As Jarren said, restarting the sandbox fixed things, but it went dead (undead?) a couple more times that evening.  Great.  Not... ;-(
I have the zombie sandbox. Every. Single. Game. I just assume I'm going to have to restart a couple of times per session. (I have one browser tab right there, ready to go).
David M. said: I experienced a zombie sandbox a couple times during my Friday night game. API heartbeat was spinning away indicating sandbox was up, there were no errors in the api console, but no scripts worked (I tried several different ones). As Jarren said, restarting the sandbox fixed things, but it went dead (undead?) a couple more times that evening.  Yep, that is what was happening.  I have APIHeartbeat and it indicated the API was up (gave me a wonderful graph and everything), but I had to still disable and reenable Spawn. **Note to self: Pretest ALL script a BEFORE the game starts
1640046078
David M.
Pro
API Scripter
You shouldn't have to disable/enable anything. A simple restart of the sandbox should do, and is faster.
I actually think that the zombie crash is cause the api sandbox of one of your other sessions crashed while yours didn't.  Are you guys sharing sessions with free/plus users?   Its highly popular on the discord player communities and I'm pretty sure the sandbox and the audio manager are now linked to the most recently launched sessions.  I share sessions to my players for the purposes of setting up DL before they bring them in and I repeatedly can see my sandbox restarting whenever theirs crashes and restarts or spins up from idle.  
1640099962

Edited 1640100211
I'm pretty sure the sandbox and the audio manager are now linked to the most recently launched session This is completely new to me. In our community we play quite a few Epics per year. For an Epic one pro-user masters the game and multiple GMs build the quests in this master game. At the day of the Epic session, we (import all PCs and then) copy the game once per participating GM  and add API scripts. The last one was early december with 5 simultaneous GMs and 28 players. Everything worked fine. Some players experienced lag with rolls as usual, but other than that... flawless fun.