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

Has anyone develeoped an updated version or fixed a version of Michael Heilemann The One Ring Script? https://github.com/Heilemann/roll20-tor-scripts

1525775139
Michael I.
Pro
Sheet Author
I have Followed the guide on roll20 Wiki extended Macro page to setting it up, gone to community site and read what I could find (tried using suggested code fixes to the script from there to no avail. looks like the last fix's to the code were over 2 years ago so I am assuming roll20 has updated something in that time. that may have broken this code? Maybe The one Ring Community can come together and we can fix the code or improve it and update the roll20 wiki Page? to help all of us?  TypeError: Cannot read property 'set' of undefined TypeError: Cannot read property 'set' of undefined at setStanceOnTokensCharacter (apiscript.js:102:11) at updateStanceOnDrop (apiscript.js:77:9) at apiscript.js:50:5 at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:70:8) at TrackedObj.set (/home/node/d20-api-server/api.js:1020:14) at updateLocalCache (/home/node/d20-api-server/api.js:1318:18) at /home/node/d20-api-server/api.js:1502: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)
1525786353
The Aaron
Pro
API Scripter
The issue is that the character has no stance attribute.  You could protect against this by making this change in the script: var setStanceOnTokensCharacter = function (token, newStance) {     var characterid = token.get('represents');     var stance = (findObjs({         _characterid: characterid,         _type: 'attribute',         name: 'stance'     })[0];     if(stance){         stance.set('current', newStance.toString());     } else {         createObj('attribute',{             characterid: characterid,             name: 'stance',             current: newStance.toString()         });     }     sortTurnorder();     // sendChat('character|'+characterid, '/w gm !sortturnorder'); }; at the bottom of tor-stance.js
1525788120
Michael I.
Pro
Sheet Author
The Aaron You are a Beast and we (as in the community) owe you a great thanks for all the posts and recommendations you make please keep it up we are grateful. 
1525788215
The Aaron
Pro
API Scripter
HAHAHA, no problem.  Let me know if you run into any other issues. =D