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

Problems with Token Name Number not working

Hey, I've been using this for quite a while and it's a real time saver, but it's recently stopped working. I have tried refreshing the sandbox without success and have tried putting the most up to date version in, but I keep getting the error I've posted below. Would anyone have any ideas on how to fix it? For reference, the error message generated was: TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at handleGraphicMovement (apiscript.js:495:28) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:70:8) at TrackedObj.set (/home/node/d20-api-server/api.js:1076:14) at updateLocalCache (/home/node/d20-api-server/api.js:1419:18) at /home/node/d20-api-server/api.js:1605: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)
1649858420
The Aaron
Roll20 Production Team
API Scripter
That error is in CombatMaster or Combat Tracker.  What scripts do you have installed?
1649858536

Edited 1649858612
The Aaron
Roll20 Production Team
API Scripter
Looks like it happens when there's nothing in the turn order, or perhaps when the current turn is a custom turn entry.  (Definitely an empty turn order)
1649858863
The Aaron
Roll20 Production Team
API Scripter
I'd suggest upgrading to a more recent version of CombatMaster.  If you don't want to do that, you can find in your existing script where it has this function (or one similar): handleGraphicMovement = (obj, prev) => { if(!inFight()) return; if(getCurrentTurn().id === obj.get('id')){ changeMarker(obj); } }, and change it like this: handleGraphicMovement = (obj, prev) => { if(!inFight()) return; if( ( getCurrentTurn() ||{}) .id === obj.get('id')){ changeMarker(obj); } }, That will prevent the crash.
I only have token number and the turn tracker. I've tried adding a token to the turn order which doesn't seem to have made a difference. I've tried turning turn tracker off as well which doesn't seem to have made a difference. I've also tried loading in an earlier version of token number which also doesn't seem to have worked.
The Aaron said: I'd suggest upgrading to a more recent version of CombatMaster.  If you don't want to do that, you can find in your existing script where it has this function (or one similar): handleGraphicMovement = (obj, prev) => { if(!inFight()) return; if(getCurrentTurn().id === obj.get('id')){ changeMarker(obj); } }, and change it like this: handleGraphicMovement = (obj, prev) => { if(!inFight()) return; if( ( getCurrentTurn() ||{}) .id === obj.get('id')){ changeMarker(obj); } }, That will prevent the crash. Amazing, I will give this a go
1649861534

Edited 1649861641
The Aaron
Roll20 Production Team
API Scripter
If that doesn't work, feel free to PM me a join link and GM me, and I'll come investigate and fix it.
That's incredibly kind of you, thankyou!