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

All my API stopped Working [GM for 40k Wrath and Glory using the W&G API for PCs Sheets]

1620362910

Edited 1620363272
First Time poster here, but all my APIs stopped working. This is a problem since 40k Wrath and Glory's API Dice Roller and character sheets well contain all their character sheets. I don't think that program is the problem though since this is the error I get  Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again.  More info...  If this script was installed from the Script Library, you might find help in the Community API Forum. For reference, the error message generated was:  TypeError: Cannot read property 'forEach' of undefined TypeError: Cannot read property 'forEach' of undefined at clearTokenStatuses (apiscript.js:4908:24) at commandHandler (apiscript.js:4898:4) at apiscript.js:4629:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-node-f.cjs:1323:7) at inputHandler (apiscript.js:4624:23) 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:1663: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) and here is a list of All the API I am currently using  Script Library G  WH40k Wrath & Glory Die Roller G  UniversalVTTImporter G  splitArgs G  Vector Math G  Path Math G  MatrixMath G  HTML Builder G  Combat Master G  Duplicate a Character and Token G  Token Collisions G  Marching Order G  ImperialCalendar G  Character Sheet Utils New Script I was using "Its A Trap" with TokenMod and KABOOM cause I wanted to simulate landmines, but I deleted those [as they were the most recent installations] and it is still not working? 
1620365006
Kraynic
Pro
Sheet Author
Did you restart the api sandbox?  If an event or command caused problems somehow, usually you can just restart the sandbox and be up and running again. 
1620371381

Edited 1620371394
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The problem is likely occurring in Combat Master. "clearTokenStatuses" is a function in that script. Normally, that script interacts with TokenLib for anything other than the default token markers. I would try loading that script from the One Click, or at the very least, disabling Combat Master to see if that is indeed the source of the problem. If loading TokenLib doesn't clear up the problem, I would suggest posting the issue in the Combat Master thread.
1620379380

Edited 1620383224
This crash happens when you perform the command !cmaster --clear with no tokens selected. This is a bug in combat master. I found two places in CombatMaster that do not properly check this situation and have submitted a fix (version 2.41). After the next pull-moment it won't happen again.
1620397580
Victor B.
Pro
Sheet Author
API Scripter
Ugg, I'll look at fixing that this weekend.  Ugly.