Hey guys, im trying to make a custom sheet with sheet workers for a homebrew tabletop that my buds and I are doing. The issues that im running into is that no matter what, I cant get certain fields to update. Heres my current code. <script type="text/worker">
on("change:strs sheet:opened", function () {
getAttrs(["strs"], function (values) {
const strs = parseInt(values["strs"], 10)||0;
const mod = 0;
if (strs = 1){
mod = 0;}
else if (1 < strs && strs <= 11){
mod = ((strs - 1) * 5);}
else if (11< strs && strs <= 19){
mod = (((strs-11)/2)*5)+50;}
else{
mod = (((strs-19)/4)*5)+70;}
setAttrs({
block: (mod + 15);
});
});
});
</script> in the html strs is defined as attr_strs while block is attr_block. Could someone please help? Thanks.