Hello everyone, I try to write a script that rolls to pair of dice and checks if the first pair has more hits then the second. It should reroll until that happens and count the amount of tries. const rollAcq = (values) => { if(values.item == undefined || values.player == undefined){ sendChat(`Script`, Missing values`, null, {noarchive: true}); } else { values.tries += 1; sendChat(`Script`, `[[ [[${values.player}d6>5sd!]]-[[${values.item}d6>5sd]] ]]`, function(result){ let nethits = -1; sendChat(`Script`, `${result}`, null, {noarchive: true}); if(values.result != undefined) { nethits = result[0].inlinerolls[0].results.rolls[0].results; } sendChat(`Script`, `${values.item} ${values.player} ${values.value} ${values.tries} ${values.result}`, null, {noarchive: true}); if(nethits > -1) { let newMsg = 'Nach ' + values.tries + ' triesn wurden ' + nethits + ' nethits erzielt'; sendChat(`Script`, `${newMsg}`, null, {noarchive: false}); } else { rollAcq(values); } }, {noarchive: true}) return; } With this code I get errors due to stack size. Anyone an idea what I did wrong? Or how to do it the right way? Thanks