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

Auto calculated fields are not changing when linked field is. Some help please?

So the issue with one example: I have an <input> statement as type=number saving to the field attr_STR. I then later create another <input> field that auto calculates value='round(@{STR}/2)' disabled=true and saves it as name='attr_STRh'. Later I have a <button> that executes value='/roll 1d100<@{STRh}'. Now in game, If I change attr_STR, on the character sheet it will recalculate attr_STRh BUT on the Attributes&Abilities tab it does NOT change, meaning when I click that roll button the old number is still being referenced not the new one. Any ideas?
1412691640
Sam M.
Pro
Sheet Author
If it's auto calculated, delete the attribute in the Attributes & Abilities tab. Auto calculated values should never appear there because those never change.
Ok, that fixed one problem but now i'm getting this error when I'm trying to incorporate an autocalculated number into a roll: Could not determine result type of: [{"type":"M","expr":1},{"type":"C","text":"d100 here's a snip of my code: <tr> <td><B>STR</B>ength</td> <td><input type=number style="width: 3em;" name="attr_STR"/></td> <td><button type=roll value="/roll 1d100<@{STR}"></button></td> <td><input type=number style='width: 3em;' name="attr_STRh" value='round(@{STR}/2)' disabled="true"/></td> <td><button type=roll value="/roll 1d100<@{STRh}"></button></td> <td><input type=number style='width: 3em;' name="attr_STRq" value='round(@{STR}/4)' disabled="true"/></td> <td><button type=roll value="/roll 1d100<@{STRq}"></button></td> </tr> any suggestions please? the first button rolls fine where the attr_STR is not calculated but doesn't work for any further button that is calculated.
1412731597
Lithl
Pro
Sheet Author
API Scripter
The right side of the comparison operator must be a single number. use /roll 1d100<[[@{STRh}]] and /roll 1d100<[[@{STRq}]] instead (the inline roll gets treated as a single number).
Thanks very much Brian! Not only did it work, but your explanation as to why it works was even more helpful.