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 .
×
May your rolls be chill this holiday season!
Create a free account

Combat Tracker API / 5E Character Sheet Initiative Not Working

So had a session tonight, everything was going great and randomly the Combat Tracker API stopped working. When it did, all of my pre-built initiative MACROs and even the D&D 5E character sheet was unable to roll initiative and/or add it to the turn tracker. Any thoughts or help would be appreciated.  (note: I checked another one of my campaigns with similar API scripts and the combat tracker and character sheet were working just fine. The MACROs I used as a backup until I found the Combat Tracker API was /w gm %{selected|npc_init} for NPC Initiative which I enabled as token actions and &{template:npcaction} {{rname=@{selected|character_name}}} {{name=Initiative}{{description=@{selected|character_name} prepares for battle! [[1d20+@{selected|initiative_bonus}&{tracker}]]}} for player initiative.  This is the API error I received...  "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 'id' of null TypeError: Cannot read property 'id' of null at apiscript.js:916:21 at Array.forEach (<anonymous>) at checkMarkerturn (apiscript.js:915:19) at getOrCreateMarker (apiscript.js:883:9) at removeMarker (apiscript.js:595:9) at stopCombat (apiscript.js:577:9) at handeIniativePageChange (apiscript.js:1331:13) 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 TrackedObj.set (/home/node/d20-api-server/api.js:1048:14)
1610945875

Edited 1610946094
Victor B.
Pro
Sheet Author
API Scripter
Combat Tracker hasn't been supported in years.  Combat Master is the new version of it and Status Info has been built in.   The checkMarkerTurn determines if you hit the end of round.  Looks like the end of round entry in turn order (which has the token marker as the image for it) was somehow not generated correctly.  
So I disabled Combat Tracker and added Combat Master and I am still having the same issue.  The initiative will still not roll from either MACRO or Character sheet and as soon as I try to start combat with the combat master I get this error.  For reference, the error message generated was:  TypeError: Cannot read property 'id' of null TypeError: Cannot read property 'id' of null at handleGraphicMovement (apiscript.js:15407:32) 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 TrackedObj.set (/home/node/d20-api-server/api.js:1048:14) at updateLocalCache (/home/node/d20-api-server/api.js:1346:18) at /home/node/d20-api-server/api.js:1530:11 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)
1610989581
Victor B.
Pro
Sheet Author
API Scripter
Send me a PM and I'll take a look. You've got something off.  I don't support CT at all.  
Update: I was finally able to resolve the issue.  Turns out that if you open the Turn Order Tracker and clear all turns from the list, it defaults it back to where new turns can be added using both API, MACROs, and the character sheet initiative.