I looked into writing a bookmarklet that would figure out where the error actually is. Looks like the order is determinate, but not obvious. To avoid as many silly errors as possible, I've adopted the following development process: Write script in external editor ( Vim for me, YMMV! ) Run script through JSLint ( I use these options: --white --maxerr 10000 --nomen --plusplus --predef on,_,state,sendChat,findObjs,getObj ) If there were errors from 2, fix errors them and go back to 2. Paste script into Roll20. Fiddle with testing on Roll20 via log(), sendChat(), running commands, etc. Back port understanding to external editor, return to 1 This process generally takes care of the missing parenthesis, typo'd variable names, etc. It also allows me to use an editor that has more then 27 lines and powerful editing capabilities ( Vim! =D )