The reason that Jakob sent you to the closure compiler is because it is the best way to find simple code problems like missed brackets and what not. However, your problem is one that wouldn't be caught since it is technically valid syntax. // Greater Effects
on('sheet:opened change:repeating_rituals:greatereffects', function (e) {
updateGreaterEffectsMultiplier();
});
function updateGreaterEffectsMultiplier(callback) {
console.log('********* updateGreaterEffectsMultiplier ***********');
callback = callback || noop;
TAS.repeating('rituals')//You should really end every declaration with a semi-colon or a comma depending on the line
.fields('greatereffects', 'greatereffectsmultiplier')
.each(function(r){
var effects = (r.greatereffects); //This doesn't really serve a purpose, if you still want to do it this way, then you can combine these into a single var declaration
var multi = (( 2 * effects) + 1 );
setAttrs({
r,greatereffectsmultiplier: multi//You have a comma after r instead of period, and you can't dynamically create a key this way anyways, you have to use template literals
});
},)}//I'm not as familiar with TAS syntax, but is this comma supposed to be here? Those comments result in this minorly changed code: // Greater Effects
on('sheet:opened change:repeating_rituals:greatereffects', function (e) {
updateGreaterEffectsMultiplier();
});
function updateGreaterEffectsMultiplier(callback) {
console.log('********* updateGreaterEffectsMultiplier ***********');
callback = callback || noop;
TAS.repeating('rituals')
.fields('greatereffects', 'greatereffectsmultiplier')
.each(function(r){
var multi = (( 2 * r.greatereffects) + 1 );
setAttrs({
`${r.greatereffectsmultiplier}`: multi
});
})
},