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

Error running Script After the Upgrade

I have been using a script to generate monster tokens from stat blocks (Statblock import for 5e character sheet). After the upgrade I am getting errors with this script. Worked fine before the upgrade. Anyone have an idea how to fix it. 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: evalmachine.<anonymous>:714 var res = ops[0].inlinerolls["1"].results.total; ^ TypeError: Cannot read property 'results' of undefine
1438230168
Lithl
Pro
Sheet Author
API Scripter
There was a breaking change on the development server about 2 months ago (which has now been pushed to production). The inlinerolls property of a message object used to be an object with numeric keys beginning with 1, and now it is an array. Changing inlinerolls["1"]  to inlinerolls[0]  should fix the problem.
Ding. that did it. Thanks