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 .
×
D&D 2024 has arrived! Pre-order the new core rulebooks now and get an exclusive pre-order bonus for free!
Create a free account

[Sheetworkers] Copied Directly from Wiki

Am I doing this right? I've copied this entry example directly from the wiki and placed it in the <script> section of my custom sheet.  I've saved the sheet, and reloaded my instance of the game. on("change:strength", function() { getAttrs(["Strength", "Level"], function(values) { setAttrs({ StrengthMod: Math.floor(values.Strength / 2) }); }); }); I make an attribute called "Strength", and "StrengthMod" and I edit it on the sheet, and...... nothing happens.  I open up my log and I see that change:strength happened... but nothing in the script activated.  I've added log() commands to the entry, and nothing shows up -- however, when I open up the log on another game of mine (using the Pathfinder sheet), all sorts of stuff screams into the log. None of the other examples ont he wiki seem to work for me, either. I feel like I'm going crazy.
1479007819
The Aaron
Pro
API Scripter
Is the script set to the right type? <script type="text/worker">
It was copied, and recopied directly from the wiki and it didn't work.  Then I copy pasted your versions of the <script> tag, and it worked, so now I'm just confused. Gonna chalk it up to my noobishneess. Thanks!