Jakob said: There's an extra semicolon on line 17. In general, it's a good idea to put your code into an external syntax validator ... the first web-based one google gives me is http://esprima.org/demo/validate.html
. It will give a more useful error message (+ line number) than Roll20. To be fair, lines 1-21 are all syntactically valid, and the site you linked to gives the same error as Roll20. =) @Michael P: also, I would point out that the first parameter to sendChat is the name of the "person" sending the message, not the message itself. Line 17 also has a problem of using assignment (getAttrByName(...) = 'true') instead of equality (== or ===). In that line, you're also attempting to get the "checked" property of the string 'main_foc', which will be undefined.