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

May 04 (4 years ago)

Edited May 04 (4 years ago)

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 https://app.roll20.net/forum/post/8458497/slug%7D

May 04 (4 years ago)

Edited May 04 (4 years ago)

Thanks, but I'm still getting the same error.  After further testing, it looks like it's happening with ALL scripts that try to output a message.  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.  FWIW, this just started happening about 12pm EDT.

May 04 (4 years ago)
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.

May 04 (4 years ago)

Ok, well, playing around with things, it looks like TokenFate may be the culprit.  Based on another post, I removed that, and everything worked fine.  I put that back in, and everything broke.  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.  But, this looks like a problem with TokenFate.  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.

May 04 (4 years ago)
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.

May 04 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

Details here: https://app.roll20.net/forum/post/8566590/token-fate-on-click-broken#post-8570315

May 04 (4 years ago)


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.  Hopefully, it will be available by my game time tomorrow. :-)  Thanks!

May 04 (4 years ago)


The Aaron said:

Details here: https://app.roll20.net/forum/post/8566590/token-fate-on-click-broken#post-8570315

Yes, I found that thread which is what led me to TokenFate as the problem.  As I mention elsewhere, older versions (v 1.1.0 and v1.0.0) also cause problems.  Other scripts will work once, and then the same errors pop up.   


May 04 (4 years ago)
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.