hello, i am new to roll20, but i am trying to learn :) excellent platform ! now on topic, ii have the bellow script. it will calculate the sum of 3 Strength variables and return the total. //<script type="text/worker"> on("change:strength_rank change:strength_item change:strength_special sheet:opened", function() { getAttrs(["strength_rank","strength_item","strength_special"], function(values) { let rank = parseInt(values.strength_rank,10)||0; let item = parseInt(values.strength_item,10)||0; let special = parseInt(values.strength_special,10)||0; let total = rank + item + special; setAttrs({strength_total: total}); }); }); </script> but i have 8 attributes and dont want to rewrite the same code over and over... so i thought to write something like the following (btw i am new to this scripts. i have var basic & good knowledge to programming languages (older)) <script type="text/worker"> const int = score => parseInt(score, 10) || 0; const stats = ["size", "strength","agility","stamina","perception","mental","personality","magic"]; stats.forEach(stat => { on(`change:${stat}_rank,${stat}_item,${stat}_special sheet:opened`, () => { getAttrs([stat], values => { let rank = parseInt(values.`${stat}_rank`,10)||0; let item = parseInt(values.`${stat}_item`,10)||0; let special = parseInt(values.`${stat}_special`,10)||0; let total = rank + item + special; setAttrs({[`${stat}_bonus`]: total}); }); }); }); </script> but it does not work. can you help me correct the problem with the above script? i think the problem is where i am trying to attack the "values" with "${stat}" & "_rank" to take the value from thank you in advance!