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

How Do I Stop API Crashes

Hi there! New Roll20 DM here and absolute novice at coding/html. At the start of a session the APIs I have work just great. I have the Roll20 OGL Companion, Hitdice, Torch and Cycling Tips. Midway through a sessions it will crash and all the cool things stop, including the automated Hitdice adding to health spellslot tracking. It always reads the below text (I shouldn't say always, I don't know that, it just always looks the same to my novice-coding eyes), how do I stop it crashing please: "Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again.  More info... For reference, the error message generated was:  TypeError: Cannot read property 'split' of undefined TypeError: Cannot read property 'split' of undefined at apiscript.js:554:58 at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1648:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400
1587475386
The Aaron
Roll20 Production Team
API Scripter
Are each of those installed from the 1-click?  What order are they installed in on the tabs on the API page?
Im not sure what the 1-click is. I got Hitdice and Cycling Tips from this forum and the rest come from the drop down menu. Below is a screenshot fo the order they're installed.
1587478093
The Aaron
Roll20 Production Team
API Scripter
Cool.  The issue is probably in the hitdice script.  Can you link to where you got that?  
1587478126
The Aaron
Roll20 Production Team
API Scripter
1-click scripts are the ones you install from the dropdown.  5e Companion and Torch in the above.
I got the Hitdice coding from a github post that I found on a thread on this forum a while back. Its brilliant when it works. haha
The A-man is the resident expert, if you disable the scripts one at a time, you can at least find which ones are fighting.