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

Its a trap script completely changed

1563933514

Edited 1563934135
Does anyone else have an issue with the its a trap script? I am getting this error when a trap triggers, and All of my traps have a every sound in jukebox linked to them for some reason. (From TrapTheme: 5E-Generic): CharSheetUtils is not defined
1563938216
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
It's a new dependency of the script. Just add the script indicated from the one click drop-down.
1563979772

Edited 1563980266
Ada L.
Marketplace Creator
Sheet Author
API Scripter
They don't actually have every sound turned on. I just forgot to test the new drop-down menu for the Sound property with tracks containing special characters in their names. Action buttons with a drop-down menu break like this if any of their options contain certain special characters. If anyone can report any track names in particular that might be causing this problem, that would really help to identify characters that are causing problems.
1563981107

Edited 1563992528
Does this help you track down the error? Several of my tracks have parentheses in the title, for example: Pillars of Eternity Soundtrack 13 - Temple of Skaen (Justin Bell)     <----- This is the one breaking my menu. There are several with dashes in the title, for example: Castle Ruins - Ruins of The Black Castle at Storm's Edge - Kole Audio Solutions I found a few with underscores, for example: Merchant - Backally Fence - Joe_J_Thomas At least one with a apostrophe, for example: Tavern Owner - Goblin's Woe Gambling Hall - Edwyn Tiong Found a couple with periods in the title, for example: Guild Wars 2 OST - 70. The Heart of Rata Sum I stripped out all of the characters above and put them in one by one. The parentheses are the characters that are breaking the menu.
Stephen L. said: They don't actually have every sound turned on. I just forgot to test the new drop-down menu for the Sound property with tracks containing special characters in their names. Action buttons with a drop-down menu break like this if any of their options contain certain special characters. If anyone can report any track names in particular that might be causing this problem, that would really help to identify characters that are causing problems. Audio|Action by Kevin MacLeod|Battle Without Honor Or Humanity|Dark and Stormy by Tabletop Audio|Desert Winds by Tabletop Audio|Disembodied Spirits by Tabletop Audio|Down by the Sea by Tabletop Audio|Dungeon II: Mechanical by Tabletop Audio|Dungeon I by Tabletop Audio|Dwarven City by Tabletop Audio|Forest Night by Tabletop Audio|Forest: Day by Tabletop Audio|Open Ocean by Tabletop Audio|Waiting Time by Tabletop Audio|Star Wars Jawa Sound Effects|Ancient Arabian Music - Arabian Nights|Ancient Egyptian Music - Pharaoh Ramses II|Creepy Egyptian Music - Mummy's Tomb|Desert - Shifting Sands at Night (With Animals) by Olivier Girardot|Desert - Shifting Sands at Night by Olivier Girardot|Desert - Shifting Sands in Day (With Animals) by Olivier Girardot|Desert - Shifting Sands in Day by Olivier Girardot|Accralate by Kevin MacLeod|Asian Drums by Kevin MacLeod|Curse of the Scarab by Kevin MacLeod|Desert City by Kevin MacLeod|Volatile Reaction by Kevin MacLeod|Elevator Music - Vanoss Gaming Background Music (HD)|Drums of War|Sahara}) This is the complete list from one of my campaigns.
1564008267
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Thanks for providing those playlists! I made an update that ~should~ fix it.&nbsp; <a href="https://github.com/Cazra/roll20-api-scripts/blob/trap/Its%20A%20Trap/3.9.3/ItsATrap.js" rel="nofollow">https://github.com/Cazra/roll20-api-scripts/blob/trap/Its%20A%20Trap/3.9.3/ItsATrap.js</a> Just copy-paste the above script manually for now until it gets merged into the One-Click library. Let me know in this thread if there are any more problems with this issue.
1564075983

Edited 1564076435
Hey Stephen, Im using your 3.9.3 version, OGL Sheet settings, and it seems to be crashing the API after a sound completes. My sound titles have spaces in them if that helps? "Net Trap" and "Area 1" ypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at _.each (apiscript.js:16739:63) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:191:9) at changeHandler (apiscript.js:16736:16) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at TrackedObj.set (/home/node/d20-api-server/api.js:1028:14) at updateLocalCache (/home/node/d20-api-server/api.js:1318:18) at /home/node/d20-api-server/api.js:1530:7 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)
1564081685

Edited 1564082273
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Dustin C. said: Hey Stephen, Im using your 3.9.3 version, OGL Sheet settings, and it seems to be crashing the API after a sound completes. My sound titles have spaces in them if that helps? "Net Trap" and "Area 1" ypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at _.each (apiscript.js:16739:63) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:191:9) at changeHandler (apiscript.js:16736:16) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at TrackedObj.set (/home/node/d20-api-server/api.js:1028:14) at updateLocalCache (/home/node/d20-api-server/api.js:1318:18) at /home/node/d20-api-server/api.js:1530:7 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) I've tested it with samples that have spaces in their names. Those work fine. I have no idea what's going on from that stack trace there. It looks like an uncaught error from some other script (not sure which though, since it doesn't tell which function the error was actually thrown in). It's A Trap's event handlers are set up to catch and report any errors in the log with a more informative stack trace.&nbsp; e.g. "Error: This is a just a test. It's not really an error.\n at TrapEffect.playSound (apiscript.js:9732:13)\n at TrapEffect.announce (apiscript.js:9528:14)\n at Promise.resolve.then.then.effectResults (apiscript.js:10908:16)" Could you provide the rest of your API console log?
1564083060
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
At a guess you've got roll20am installed Dustin, changehandler exists in that script.
1564083083

Edited 1564083246
Ravenknight
KS Backer
Stephen L. said: Thanks for providing those playlists! I made an update that ~should~ fix it.&nbsp; <a href="https://github.com/Cazra/roll20-api-scripts/blob/trap/Its%20A%20Trap/3.9.3/ItsATrap.js" rel="nofollow">https://github.com/Cazra/roll20-api-scripts/blob/trap/Its%20A%20Trap/3.9.3/ItsATrap.js</a> Just copy-paste the above script manually for now until it gets merged into the One-Click library. Let me know in this thread if there are any more problems with this issue. Hi Stephen,&nbsp; I'm sorry but I still get this error in chat even with the new version: Edit: Nope, sorry I forgot to make a new trap before testing. It seems to work and I'm an idiot. :/
1564085642

Edited 1564085691
Yeah I do Scott, I forced a crash again... its the same info. Is there somewhere else I should be looking for the API Log? API sandbox shutdown due to campaign inactivity. Spinning up new sandbox... "Starting webworker script..." "Loading 663 translation strings to worker..." "Registered CheckItOut theme: D&amp;D 3.5E" "Registered CheckItOut theme: D&amp;D 4E" "Registered CheckItOut theme: Gamma World 7th Edition" "Registered CheckItOut theme: D&amp;D 5E Community" "Registered CheckItOut theme: D&amp;D 5E Roll20" "Registered CheckItOut theme: D&amp;D 5E Shaped" "Registered CheckItOut theme: Pathfinder Roll20" "Registered CheckItOut theme: Pathfinder Community" "Registered CheckItOut theme: Pathfinder Simple" "Registered CheckItOut theme: Starfinder Roll20" "Registered CheckItOut theme: Starfinder Simple" "It's A Trap!: Registered TrapTheme - default." "-=&gt; MonsterHitDice v0.3.6 &lt;=- [Mon Aug 15 2016 13:08:21 GMT+0000 (UTC)]" "-=&gt; TokenMod v0.8.44 &lt;=- [Tue Mar 19 2019 16:58:29 GMT+0000 (UTC)]" "-=&gt; TokenNameNumber v0.5.12 &lt;=- [Tue Jul 25 2017 15:01:48 GMT+0000 (UTC)]" "-=&gt; GroupInitiative v0.9.29 &lt;=- [Tue Apr 03 2018 13:36:05 GMT+0000 (UTC)]" "-=&gt;HealthColors v1.6.0 [Updated: Feb 12 2019]&lt;=-" "-=&gt; ChatSetAttr v1.9 &lt;=-" "-=&gt; ColorEmote v0.1.5 &lt;=- [Sun Apr 02 2017 14:08:13 GMT+0000 (UTC)]" "-=&gt; Torch v0.8.12 &lt;=- [Sat Jul 20 2019 01:24:57 GMT+0000 (UTC)]" "--- Initialized Areas Of Effect v1.6.1 ---" "Concentration Ready! Command: !concentration" "-=&gt; AlterBars v2.0.6 &lt;=- [Fri Aug 17 2018 15:35:14 GMT+0000 (UTC)]" "--- Initialized Carry Tokens ---" "Treehugger is up and running!" "-=&gt; Roll20AM v2.12 &lt;=- [Wed Apr 05 2017 00:26:44 GMT+0000 (UTC)]" " &gt; Updating Schema to v2.02 &lt;" " &gt;Roll20AM has had a significant update. The command syntax has changed and any currently existing macros will need to be updated. Please check the **[forum thread](permalink to your release post)**" " &gt;Stored settings loaded&lt;" " &gt;Help handout updated&lt;" "--&gt; Flying v2.1 &lt;-- Initialized" "*** Initialized Check It Out v1.1 using theme 'D&amp;D 5E Roll20' ***" "-=&gt; EasyExperience v1.11521693362 &lt;=- [Wed Feb 07 2018 17:14:42 GMT+0000 (UTC)]" "-=&gt; GroupCheck v1.10 &lt;=-" "-=&gt; ApplyDamage v1.1 &lt;=-" "It's A Trap!: Registered TrapTheme - 5E-Generic." "--- Initialized It's A Trap! v3.9.3, using theme '5E-Generic' ---" "Segment (1225,735) and (385,735) to point (3920,6160)" " u factor: 0.00" " distance: 6057.53" {} {} "Segment (1365,875) and (1225,735) to point (3920,6160)" " u factor: 0.00" " distance: 5870.20" {} TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at _.each (apiscript.js:16739:63) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:191:9) at changeHandler (apiscript.js:16736:16) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at TrackedObj.set (/home/node/d20-api-server/api.js:1028:14) at updateLocalCache (/home/node/d20-api-server/api.js:1318:18) at /home/node/d20-api-server/api.js:1530:7 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)
Definitely a conflict, disabled Roll20AM and it worked. Worked fine the other day tho, not sure what happened.
1564086587
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Looking at Roll20 AM's source code, it looks like there's several places where it tries to access the id property of an object without first checking that the object is defined. I haven't used the Roll20 AM script, so I don't really know how it works, but those parts of the source code look consistent with the error you're getting.
I just removed the tracks im using with "Its a Trap" from Roll20am's Playlist and it didn't crash. Its a work around for now I guess.