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

Token-mod crashing

Using the macro below and now I get an error. It was working fine but I see there have been updates. !token-mod --set statusmarkers|angel-outfit name|@{selected|character_name}_Blessed) TypeError: update.match is not a function TypeError: update.match is not a function at getRelativeChange (apiscript.js:1412:19) at apiscript.js:1809:68 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9) at apiscript.js:1774:8 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:158:9) at applyModListToToken (apiscript.js:1750:5) at apiscript.js:2093:25 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9) at _.(anonymous function) [as each] (/home/node/d20-api-server/node_modules/underscore/underscore.js:1496:34) at handleInput (apiscript.js:2092:22)
1491537105
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I was just coming on line to report the same thing. Crashed many times before I found the culprit. Glad it's not just me. :) Any attempt to alter a status marker crashes the API.
1491537175
Gold
Forum Champion
Similar experience tonight in my GM's game. We have a !token-mod command when a monster dies, it puts the Red X status. It stopped working today.
1491544252
The Aaron
Pro
API Scripter
Darn!  I really need a better testing solution. I'll get this fixed up in the morning and push out a fix. Sorry all. :(
1491544328
The Aaron
Pro
API Scripter
In the short term, you can drop back a few versions in the 1-click and it should be fine. 
The Aaron said: Darn!  I really need a better testing solution. I'll get this fixed up in the morning and push out a fix. Sorry all. :( We are your testers. Don't sweat it we really appreciate everything you do for roll20. I love this API thanks for taking your time to improve our gaming experience. 
1491577492

Edited 1491577611
The Aaron said: In the short term, you can drop back a few versions in the 1-click and it should be fine.  I have selected 0.8.23 and restarted both the script and the sandbox and the output shows => TokenMod v0.8.29 <=- [Mon Apr 03 2017 16:34:22 GMT+0000 (UTC)]" and still crashes the script when i try to run !token-mod --set statusmarkers|screaming Just ran !token-mod --help and it show 0.8.29 at the top as well.
1491578006
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Same with 8.1.9 I wonder if there has been a behind-the-scenes change in the Roll20 code that it is not playing nice with? Here's the console error message if that helps: TypeError: update.match is not a function TypeError: update.match is not a function at getRelativeChange (apiscript.js:970:19) at apiscript.js:1367:68 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9) at apiscript.js:1332:8 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:158:9) at applyModListToToken (apiscript.js:1308:5) at apiscript.js:1651:25 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9) at _.(anonymous function) [as each] (/home/node/d20-api-server/node_modules/underscore/underscore.js:1496:34) at handleInput (apiscript.js:1650:22)
1491578023
The Aaron
Pro
API Scripter
Ok. Fixed in version 0.8.31:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/To" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/To</a>... Also expanded / and * relative changes to work on auras and such.
1491578817
The Aaron
Pro
API Scripter
keithcurtis said: Same with 8.1.9 I wonder if there has been a behind-the-scenes change in the Roll20 code that it is not playing nice with? That shouldn't be possible: That code doesn't exist in 0.8.19. &nbsp;I wonder if the version drop down doesn't actually change the version?
The Aaron said: Ok. Fixed in version 0.8.31:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/To" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/To</a>... Also expanded / and * relative changes to work on auras and such. Sorry how do I add this update? I have your script install using 1-click and its not on the list.
1491581198
The Aaron
Pro
API Scripter
Phil actually just merged it into the repo (Highly unusual! &nbsp;Thanks Phil!), so you should get it if you have the latest version selected in the 1-click! In general, you'd have to go through the process of uninstalling the 1-click version and copying the text from the above link into a new tab to save.
1491583190
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Looking good. Thanks!
1491607787
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
When the entered value is empty, this command: !token-mod --set aura1_radius|?{radius|0} Produces this error: TypeError: Cannot read property 'match' of undefined TypeError: Cannot read property 'match' of undefined at parseArguments (apiscript.js:1020:35) at Function._.map._.collect (/home/node/d20-api-server/node_modules/underscore/underscore.js:172:24) at _.(anonymous function) [as map] (/home/node/d20-api-server/node_modules/underscore/underscore.js:1496:34) at parseSetArguments (apiscript.js:1212:5) at handleInput (apiscript.js:1599:20) at eval (eval at (/home/node/d20-api-server/api.js:146:1), :65:16) at Object.publish (eval at (/home/node/d20-api-server/api.js:146:1), :70:8) at /home/node/d20-api-server/api.js:1510:12 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) Previously, it would simply remove the aura.
1491608660
The Aaron
Pro
API Scripter
Rats.&nbsp;
1491630589

Edited 1491630751
Crashing again different command. !token-mod {{--set &nbsp;&nbsp;&nbsp; light_radius#40 &nbsp;&nbsp;&nbsp; light_dimradius#20 &nbsp;&nbsp;&nbsp; light_otherplayers#on &nbsp;&nbsp;&nbsp; light_losangle#|270 light_angle#360}} &nbsp;Error: TypeError: Cannot read property 'match' of undefined TypeError: Cannot read property 'match' of undefined at parseArguments (apiscript.js:1462:35) at Function._.map._.collect (/home/node/d20-api-server/node_modules/underscore/underscore.js:172:24) at _.(anonymous function) [as map] (/home/node/d20-api-server/node_modules/underscore/underscore.js:1496:34) at parseSetArguments (apiscript.js:1654:5) at handleInput (apiscript.js:2041:20) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1510:12 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) If your not able to fix today can you tell me which was the last version that works without an error and can I get it from git? so I can manual install for my Game on Sat. Thanks
1491653743
The Aaron
Pro
API Scripter
Ok. Time for some serious testing. Sorry for all the trouble. :(
The Aaron said: Ok. Time for some serious testing. Sorry for all the trouble. :( Not a problem The Aaron. I have installed a older script. Thank you for this script it saves me time and I love it.
1491668554
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This is probably my top favorite script, since it can be used for so much. Thanks for taking the time, Aaron.
keithcurtis said: This is probably my top favorite script, since it can be used for so much. Thanks for taking the time, Aaron. +1 &lt;O
1491749428
The Aaron
Pro
API Scripter
Ok. &nbsp;I've got this fixed. &nbsp;Additionally, it should never crash the API again. &nbsp;Instead, if a command would have caused a crash, it will whisper a message like the following to whomever executed the command: The link goes to my profile in a new tab so as to make it easy to PM me the details of the problem. &nbsp;Won't interrupt the game and will help in preserving feedback. &nbsp;I'll be adding some error handling like this (actually better!) in future scripts. Here's the link for the latest version of TokenMod where this is fixed:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/To" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/To</a>... This should show up in 1-click next week or the week after. Again, I'm really sorry this causes so many issues! &nbsp;Thanks for the patience while I got it sorted out.&nbsp;