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

Problems with script

1588611156

Edited 1588611218
I've been using the TokenActions script that was developed by  Kevin .  It's been working fine (and saved me a lot of work) for several weeks now but, suddenly today, it started generating errors and I don't know what's going on.  The errors are below.  Note that I never call handleMessages directly and msg is only used in one function and that looks ok to me.  Can anyone help me to understand what's going on?   Btw, once I get all the bugs out, I'm hoping to get this into the script library so that others can use it.  As I said, it's been tremendously useful. Thanks.  ReferenceError: msg is not defined     at handleMessages (apiscript.js:608:22)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8)     at /home/node/d20-api-server/api.js:1648: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)     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)     at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 Script:  TokenAction script
Keith has made a new version of it. Check out the link&nbsp; <a href="https://app.roll20.net/forum/post/8458497/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/8458497/slug%7D</a>
1588616671

Edited 1588617105
Thanks, but I'm still getting the same error.&nbsp; After further testing, it looks like it's happening with ALL scripts that try to output a message.&nbsp; I just tried it on a test game and it failed there too, and so did other scripts that I use, including ones from the script library.&nbsp; FWIW, this just started happening about 12pm EDT.
1588620342
GiGs
Pro
Sheet Author
API Scripter
Try disabling all scripts, and enabling them one at a time. When the problem recurs, start disabling scripts (other than the last one added) one at a time till the error goes away. If it's not a roll20 issue, it's a script thats causing it. If you list the scripts you use, we can probably narrow the list down.
Ok, well, playing around with things, it looks like TokenFate may be the culprit.&nbsp; Based on another post, I removed that, and everything worked fine.&nbsp; I put that back in, and everything broke.&nbsp; According to the other thread, going to an older version of TokenFate does NOT fix the problem - with older versions, things work *once* and then fail again after that.&nbsp; But, this looks like a problem with TokenFate.&nbsp; I'm going to experiment some more and see what happens and see if removing that really fixes things or if it just fixes things for a short time.
1588623209
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Token Fate should be fixed in the push tomorrow. I'd recommend disabling it for 24 hours or so.
1588625372
The Aaron
Roll20 Production Team
API Scripter
Details here:&nbsp; <a href="https://app.roll20.net/forum/post/8566590/token-fate-on-click-broken#post-8570315" rel="nofollow">https://app.roll20.net/forum/post/8566590/token-fate-on-click-broken#post-8570315</a>
keithcurtis said: Token Fate should be fixed in the push tomorrow. I'd recommend disabling it for 24 hours or so. That's what I've done for now.&nbsp; Hopefully, it will be available by my game time tomorrow. :-)&nbsp; Thanks!
The Aaron said: Details here:&nbsp; <a href="https://app.roll20.net/forum/post/8566590/token-fate-on-click-broken#post-8570315" rel="nofollow">https://app.roll20.net/forum/post/8566590/token-fate-on-click-broken#post-8570315</a> Yes, I found that thread which is what led me to TokenFate as the problem.&nbsp; As I mention elsewhere, older versions (v 1.1.0 and v1.0.0) also cause problems.&nbsp; Other scripts will work once, and then the same errors pop up.&nbsp; &nbsp;
1588633827
The Aaron
Roll20 Production Team
API Scripter
I think there's a bug with the version dropdown that prevents older versions from being used. You have to Import them.