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

Import script works, but adding it fails

1571646945
Laurent
Pro
Sheet Author
API Scripter
Hi, I have a script which was added to the Roll20 API script library some years ago, and which I keep developing (name of the script is COFantasy). My issue is that some months ago, users started reporting issues when trying to add the script from the library. I tried it, and when just importing the script, everything works fine. But when adding it through the "Add script" button, the sandbox doesn't even seem to start, and displays the error message:  SyntaxError: Invalid or unexpected token Any idea what could be wrong, or how I could debug the issue?
1571667748
The Aaron
Roll20 Production Team
API Scripter
That's a strange issue. Do you use any HTML Entities in your script? (&, &em;, etc)?
1571673879
Laurent
Pro
Sheet Author
API Scripter
Yes, I do use entities: '   ≥ > < 
 ☯ %... Do you have any clue as to why entities could have become a problem?
1571674629
Laurent
Pro
Sheet Author
API Scripter
Could it be the json file?
1571676721
The Aaron
Roll20 Production Team
API Scripter
The script.json passes jsonlint, and it didn't look like there were any content issues. I've seen problems in the past with entities getting improperly substituted. Not sure if that's the issue.  I pointed this this thread out to the devs, hopefully they can take a look. 
1571681337
GiGs
Pro
Sheet Author
API Scripter
I remember this happening with someone else's script not so long back. I'm pretty sure that was an issue with something the the roll20 side, and couldnt be fixed without their help.
1571706102
The Aaron
Roll20 Production Team
API Scripter
That was Chris's script where the version number in the script.json didn't match the directory, I think. This doesn't seem like that. 
1571727589
Laurent
Pro
Sheet Author
API Scripter
The Aaron said: The script.json passes jsonlint, and it didn't look like there were any content issues. I've seen problems in the past with entities getting improperly substituted. Not sure if that's the issue.  I pointed this this thread out to the devs, hopefully they can take a look.  Thank you very much!
1572124404
Laurent
Pro
Sheet Author
API Scripter
No news from the devs. Anyone has any more idea what could be the reason for the errors?
1573034346
Laurent
Pro
Sheet Author
API Scripter
I just noticed that this issue is there even for older versions of the script, which used to work fine. I really don't know what to do, now.