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

[HELP][mods/API] Error message involving "TypeError: trait.get(...).includes is not a function" when using Mass Combat Companion

I was very happy when I found the D&D 5E - Mass Combat API as it seemed to offer everything I've been looking to incorporate into an upcoming session. The rules for the system were well thought out and seemed to promise the sort of unforgettable climactic battle I'd been looking for. (The page for the API script can be found here:  Mass Combat Companion Script .) However, as soon as I took to using the API, I began consistently encountering the following error message whenever I tried to make a Formation from a copy of an NPC sheet/token: TypeError: trait.get(...).includes is not a function TypeError: trait.get(...).includes is not a function at apiscript.js:27408:103 at Array.filter (<anonymous>) at apiscript.js:27408:66 at Timeout._onTimeout (/home/node/d20-api-server/node_modules/underscore/underscore-node-f.cjs:1079:17) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) Well, I'm currently at a loss, and any assistance or suggestions here would be extremely appreciated. Thank you!
1661101645
The Aaron
Roll20 Production Team
API Scripter
Hi Sean, I pushed up a change for this script that will fix the issue.&nbsp; You can find it here:&nbsp; <a href="https://github.com/shdwjk/roll20-api-scripts/blob/TheAaron-2022-08-16/Mass-Combat/1.1/MassCombat.js" rel="nofollow">https://github.com/shdwjk/roll20-api-scripts/blob/TheAaron-2022-08-16/Mass-Combat/1.1/MassCombat.js</a> It should be in the 1-click on tuesday or so.
Thank you so much! I really appreciate it.
Hmm... So now I am getting a different error message: For reference, the error message generated was:&nbsp; TypeError: (trait || {(intermediate value)}).get(...).includes is not a function TypeError: (trait || {(intermediate value)}).get(...).includes is not a function at apiscript.js:33981:119 at Array.filter (&lt;anonymous&gt;) at apiscript.js:33981:66 at Timeout._onTimeout (/home/node/d20-api-server/node_modules/underscore/underscore-node-f.cjs:1079:17) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)
1661124741
The Aaron
Roll20 Production Team
API Scripter
Ok. I've pushed a modified version again (same link) that should fix that error.&nbsp;If that doesn't work, feel free to PM me an invite and GM me, and I'll come work it out in your game.
I appreciate it, Aaron. It seems to be running smoothly now. Thanks for all your assistance here.
1661139426
The Aaron
Roll20 Production Team
API Scripter
No problem!