I need to just get down and learn javascript because I always feel like an idiot when I can't do simple things, but for now I have you smart people. So, I'm trying to do a simple button simple that lets people increment an attribute, by +1 or +3. I have this button: <button type="action" name="act_accuracy+3">+3</button> With this script <script type="text/worker">
on('clicked:accuracy+3', function() {
getAttrs(['accuracy-current'], function(values) {
// get the level stat, and coerce into a numerical value.
const level = +values.accuracy-current || 0;
// increase by 1
const newlevel = level +3;
// save the updated attribute to the sheet
setAttrs({
accuracy-current: newlevel
});
});
}); </script> I practically copy and pasted it from the wiki and it doesn't wooorrk.