I have the exact same problem. My campaign on the DEV server is showing this on the API scripts page. Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info...
For reference, the error message generated was: SyntaxError: Unexpected token |
I don't think the problem is my scripts. I think that something broke on the DEV server. I have not been on the DEV server for over a week. As I recall, I think everything was working more or less OK when last I was in it. Today I made a few changes to the roll templates section of my custom character sheet, and tried it out. I saw the above error message. I tested the code through closure compiler, and there were no errors or warnings. I rolled my changes back, and the error message still appeared. I then started deleting whole scripts. Even after I deleted every script, and the html of the character sheet, and the css, so it was a totally codeless campaign, the error message was still saying I had an unexpected token | somewhere. But without any scripts or custom html, I had no tokens anywhere. I then went to my test campaign (on the DEV server), which I occasionally use to test small code fragments. It was showing the same error. with the code that happened to be loaded upon it (different code). I then went to my real campaign on the production server. It was working fine. I then loaded my new code onto the production server, and it works fine there. So both my campaigns on the dev server always give the same error, no matter what scripts or character sheet is loaded, or even with no scripts or character sheets loaded. The same code on the production server seems to work fine. For a while I was willing to believe that the new code on the DEV server is more picky, and was picking up an existing error in my code that the production server was not having any problem with, but like I said, I still get the error message even after deleting everything deleteable!