I would have to give you my entire character sheet code. Is there another way - such as giving you access to the campaign with the custom character sheet. I only have this issue on a character sheet. Let me see if I can create a small snippet of code on a new character sheet and test it out there. The error seems to come up when I have sheet worker doing some calcs and completely unrelated normal calculations using |max attribute. For example [[(@{XP1|max}+@{XP2|max}+@{XP3|max})]]"
Here is the code for the sheet workers: <div class="sheet-row">
<div class="sheet-col-5-16 sheet-center"><input class="sheet-underlined sheet-center" type="number" name="attr_gained_xp"/></div>
<span class="sheet-col-5-16 sheet-center sheet-underlined" style="text-align:center;font-weight:bolder;font-size:100%" name="attr_total_xp_display"></span>
<div class="sheet-col-5-14 sheet-center"><input class="sheet-center" style="font-weight:bolder;font-size:100%" type="text" name="attr_xp_total_needed" disabled value="[[(@{XP1|max}+@{XP2|max}+@{XP3|max})]]"/>Total Needed</div>
</div> The other issue I am having is that my Class CSS code isn't working with the INPUT of a sheet worker field. Do I need to create a new CSS code specific to a readonly Input field? Picture below: As you can see above the sheetworker field is not affecting the XP1.2.3 variables. Here is my sheetworker code: <script type="text/worker">
on('change:gained_xp', function() {
getAttrs(['gained_xp', 'total_xp_display'], function(values) {
var total_xp = parseInt((values.total_xp_display || '').toString().split(',').join('')) || 0;
total_xp += parseInt(values.gained_xp) || 0;
if (total_xp.toString().length >= 4) {
total_xp = total_xp.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
}
setAttrs({
total_xp_display: total_xp,
gained_xp: ''
});
});
});
</script>