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 .
×

Combat Master constantly crashing the API Sandbox when ever I try and move the turnorder forward

I ran a game on Thursday afternoon using Combat Master, which worked more or less as expected. Today, I go into try and set something else up, and the sandbox is constantly crashing every time I try and move the turnorder forward. I'm using Chrome I've tried the Default and Experimental Sandboxes I've tried it in the original game and created a brand new game to test it in with no other APIs loaded. Always the same. Roll Initiative, move it on to the second person's turn, and the sandbox crashes. The is the error that comes up 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 Mod Library, you might find help in the Community API Forum. For reference, the error message generated was:   TypeError: Cannot read properties of undefined (reading 'length') TypeError: Cannot read properties of undefined (reading 'length') at apiscript.js:2422:70 at Array.forEach (<anonymous>) at getAnnounceConditions (apiscript.js:2391:49) at announcePlayer (apiscript.js:2325:27) at doTurnorderChange (apiscript.js:2048:13) at nextTurn (apiscript.js:2174:9) at commandHandler (apiscript.js:314:17) at apiscript.js:180:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-node-f.cjs:1323:7) at inputHandler (apiscript.js:175:23)
1772919957

Edited 1772920848
Victor B.
Pro
Sheet Author
API Scripter
Hmmm...nothing changed in code, so something changed in data.  The failure is pointing to the message on each condition.  It's either set to None or set to some message you want to show in chat when the turn comes active.  Check your conditions first by editing them and see what message is set to.   If you removed 'None' and didn't put in a message that might be causing it
Victor B. said: Hmmm...nothing changed in code, so something changed in data.  The failure is pointing to the message on each condition.  It's either set to None or set to some message you want to show in chat when the turn comes active.  Check your conditions first by editing them and see what message is set to.   I’ll double check tomorrow, but I know no conditions were in use, but I think it was set to announce whose turn it was in chat. The other thing I noticed is that it seems to sort the turn order automatically, even when it is set not too.  Don’t know if the problems are linked
1772932465
Victor B.
Pro
Sheet Author
API Scripter
It auto sorts.  I never put in logic to control that.  If you want more granular control, use groupInit.  You can change CM to wait for groupinit to set the turnorder.  If you don't have the default conditions in CM, it might fail.  Recommend you keep the defaults even if you don't use them
I've created a brand new game, installed Combat Master and left everything at the default settings. (I'd just assumed that as there was a Sort Turnorder - True/False option, it was meant to turn it on or off, my mistake, and not a problem). However I'm still having the same problem when moving the turn order forward. Open Turnorder Roll Inititiatve manually (I don't run D&D 5E so Inititiative_Bonus doesn't exist on the sheets, previously I've changed it so it could be rolled though Combat Master, but this time I've left everything as it was) As soon as there was a second character on the turn order it auto sorted, put the swirls around the tokens and anounced who turn it was in chat. Using API Heartbeat, I checked and the API Sandbox was still running. i clicked the arrow on the token name in chat to move the turn order forward, and the API Sandbox crashed again The same error as before. I had a look at Roll20's Change Log, and it looks like they have made some changes to the API system, so i'm not sure if that is where the issue is.  I don't really understand APIs, I can just about manage to make use of them. Combat Master is a great script and really helps me run the D&D 4E games I would hate for it to become a D&D 5E only script.  Tracking everything in D&D 4E can be troublesome without some type of API to help battle board it.
Now i'm even more confused. I've just checked one of my older D&D 4E games, that had Combat Master installed, and it appears to be working in that game.  Settings exactly as I had them in the game that stopped working, and how I've had them for years.  It was on the old Default Sandbox, but I've tried both in the brand new game and it seems to make no difference.
1772977411

Edited 1772978022
Victor B.
Pro
Sheet Author
API Scripter
So am I.  I'm running CM on jumpgate now without issue.  I didn't have to change code.  Roll20 has been working backwards compatibility for APIs on Jumpgate and it looks like they are successful.   Let's try one more thing.  Export your configs from older game.  Import into new and let's see if that makes a difference.   Problem is in announceCondition, so let's try shutting that off also.  
Is there a way to Export the Configs between games, I've always either copied the game including the API, or set it up every time I start a new game.
Tried it with everything in the Annouce menu turned off, in both the Default and the Experimental API Sandboxes, and still the same fault.
So, worked out how to export and import the configurations, and presto it worked, Combat Master is running fine. no crashing. I have a feeling something really odd is going on in the background.  If exporting and importing configurations is enough to keep it working for me, then I can live with that.