You dont terminate the getAttrs statement properly. Also that Math function doesn't work like that. Try this: on('sheet:opened change:aim', function() {
getAttrs(['aim', 'acc'], function(values) {
setAttrs({aimbonus: values.aim * values.acc });
});
}); Also, it's a good idea when having issues, to remove the calculation from the setattrs, so you can investigate what's happening. Note: The parseInt function here makes sure you are dealing with a numebr, and the ||0 sets a default of 0, if no number found. <input class="sheet-boolean" type="checkbox" name="attr_aim" value="1" />
on('sheet:opened change:aim', function() {
getAttrs(['aim', 'acc'], function(values) {
var aim = parseInt(values.aim)||0;
var acc = parseInt(values.acc)||0;
var result = aim * acc;
setAttrs({
aimbonus: result
});
});
}); Edit: i dont think you need the value in the checkbox to match acc. In fact, i think that would cause the wrong result. It looks like your calculation is using it as a binary switch, so its value should be 1 or 0.