
Hey, trying to get a sheet worker functioning to update a string used in a custom parser, but for some reason it is not working (and is probably as inneficient as possible) on('clicked:repeating_warantagonist:antagonistattack', async (info) => { const parseClickTrigger = function(string){ let match = string.match(/clicked:(?:(repeating_[^_]+)_([^_]+)_)?(.+)/); match.shift(); return match; }; let check = []; let infotext = "1"; let text = []; getSectionIDs("repeating_qualities", function(rowIds) { for(var i=0; i < rowIds.length; i++) { check.push("repeating_qualities_" + rowIds[i] + "_attach_attack"); text.push("repeating_qualities_" + rowIds[i] + "_quality_description"); } getAttrs(check, function(v) { getAttrs(text, function(x) { console.log(v); _.each(v,(k,l)=>{ infotext = x[text]="\n"; }); //setAttrs(setObj); }); }); console.log(infotext); }); let [section,rowID,button] = parseClickTrigger(info.triggerName); let name = "@{" + [section,rowID,button][0] + "_" + [section,rowID,button][1] + "_" + "active_name_input" + "}"; let offence = "@{" + [section,rowID,button][0] + "_" + [section,rowID,button][1] + "_" + "action_offence" + "}"; let effect = "@{" + [section,rowID,button][0] + "_" + [section,rowID,button][1] + "_" + "active_prefix" + "}"; let damage = "@{" + [section,rowID,button][0] + "_" + [section,rowID,button][1] + "_" + "action_damage" + "}"; let modifiera = "@{" + [section,rowID,button][0] + "_" + [section,rowID,button][1] + "_" + "action_shards" + "}"; let manipulation = "@{" + [section,rowID,button][0] + "_" + [section,rowID,button][1] + "_" + "action_manipulation" + "}"; let roll = "&{template:antagonistdamage} {{name="+name+"}} {{charactername=@{character_name}}} {{info="+infotext+"}} {{modifier=[["+modifiera+"]]}} {{manipulation=[["+manipulation+"]]}} {{targetname=@{selected|token_name}}} {{damage=[["+damage+"]]}} {{prefix="+effect+"}} {{penalty=[[(?{Attack Penalty|0})]]}} {{penaltyOffence=[[(?{Offence/Alleviation Penalty|0})]]}} {{offence=[["+offence+"]]}}" await startRoll(roll, (results) => { finishRoll( results.rollId, { manipulation: results.results.manipulation.result - results.results.penaltyOffence.result, offence: results.results.offence.result - results.results.penaltyOffence.result, penalty: results.results.penalty.result + results.results.modifier.result } ); }); }); This is the script, anyone have an idea why the string infotext is not being updated?