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

[SCRIPT] RADAR - No longer highlighting tokens - Exception Error

Hello scriptomancers. I am having some trouble with the RADAR script by David M. It worked great for some time, but recently it no longer pings the tokens it should.  I use it for Divine Sense, Detect Magic and the Wand of Secrets my party just found.  Whenever I apply the command, it outputs to text (although the unit measurements are way off), and it gives this error: (From Radar):  Unhandled exception: Cannot read property 'id' of undefined Here is an example of my macro for Divine Sense: !radar {{   --range|        [[ 12*70]]   --wavespacing|  35   --wavedelay|    50   --wavelife|     200   --pinglife|     3000   --layers|       gm, token, map   --charfilter|   npc_type: celestial#yellow, fiend#red, undead#blue   --LoS|          yes   --title|        Divine Sense   --silent|       no   --units|        u }} The chat does list the tokens that fit the criteria, but it no longer highlights the tokens with the colored indicator like it used to.  Any help?
1670246573
David M.
Pro
API Scripter
Hmm, nothing has changed in that script for a long time. Have you recently added other scripts that might be interfering?  I'd first try it out with different target tokens (ideally something dragged fresh from the compendium) to rule out something funky with the token and/or associated sheet. Also, you might try it out on a  different page. The results of these tests can help with future troubleshooting if required. Oosh pinged me about your post - I'm slammed at work today, but after seeing results from the above I can take a look at it this evening.
Thanks for the reply, David M. I have tried it on several different pages with several different target tokens, all fresh drops from the compendium, with no luck.  I have deleted and re-installed the RadarPing character and followed the setup process each time to create a default token with a transparent .png, with Represents and Controlled By left blank, and an aura set to 0 ft, not visible to players. I even went into my vault game with no other scripts installed and tested it there, and got the same results, so it does not seem to be related to another mod interfering.  That did seem to fix the discrepancies in the chat output distance calculations, but it is still not highlighting the target tokens.
I just noticed something that I feel foolish not having caught before: On my console log, when I fire the command, it returns this message for each target token: "ERROR: You must specify a valid layer to create this object type."
Ok, so I seem to have it figured out.  For some reason, the aura section of the default token kept defaulting to Visible to All Players.  Once I unselected that and updated the default token, it all worked great.
1670287023
David M.
Pro
API Scripter
Ok great, glad it's working for you!