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

Help needed: All worker scripts disabled.

Hello everyone :) Again coming over here for some pointers, building a sheet is quite a lot of work. I have a problem that appeared sometime in the past: all my sheet worker scripts stopped working it seems. I have so many iterations of this sheet, and I have been working on something else for a while, so I lost track about the point when this became a problem. I have multiple change events that should be tracked and change values in the sheet. it used to work some time ago, now, no numbers change when I update the input fields. the sheet still updates the attributes if they are changed under Attributes and Abilities. I have tried to give all my functions a command to help me debug, sendChat("", "/w gm 123HTML"); Nothing happens in the chat though, and I wanted to know if anyone can at least point me in the right direction. like a list of problems that could block all script workers.  Thanks in advance for helping an html noob out :)
1531743809

Edited 1531744214
Update: trying to fix things by looking at the first version I found that works. to my surprise the sendChat command seems to break the worker scripts in this older version... no idea why. this is the first time I tried to use sendChat with sheets, because I think better debuging is needed. EDIT: I feel stuck with debugging sheet code to be honest. I cant use log() functions right? no send chat neither... the output is very limited for me - regarding sheet debugging right now. if anyone could teach me some better debugging practices for this sheet environment that would already help a great deal.
1531744294

Edited 1531744802
Jakob
Sheet Author
API Scripter
You can use console.log() for debugging. Conversely, just using sendChat() will probably crash your sheet worker function with a type error reference error. If nothing at all happens, there's probably some kind of syntax error. Run your code through some kind of syntax checker (like closure compiler) to test for syntax errors first. If there's no syntax error, observe the browser console on game start (or maybe first sheet opening) for errors.
thanks Jakob! will look into the bug some more right now :)
1531862509

Edited 1531862571
You Jakob are a gentleman and a scholar! haha :D Both the console.log() and the closure compiler are beautiful. thank you so much! Problem solved <3