
Ok, so this is more about Github than about the API. I don't know how to use GitHub... or at least I don't know why it's not letting me do a "pull" so I can fix the broken code. I'm trying to fix the MagicalSurges.js script in the Github repository at: <a href="https://github.com/nmrcarroll/MagicalSurges/blob/master/MagicalSurges.js" rel="nofollow">https://github.com/nmrcarroll/MagicalSurges/blob/master/MagicalSurges.js</a> What is needed is to make the following change: if (!cantrip && (spell_level > 0 || msg.rolltemplate == 'spell')) { const roll = randomInteger(20); if (!cantrip && (spell_level > 0 || msg.rolltemplate == 'spell')) { let chatMesg = ''; chatMesg = `&{template:simple} {{rname=Wild}} {{r1=${roll}}} {{normal=1}}`; if (whisper == undefined) { sendChat(msg.who, chatMesg); } else { sendChat(msg.who, `/w gm ${chatMesg}`); sendChat(msg.who, `/w ${msg.who} ${chatMesg}`); } } return roll; } } }, The problem is that the script, as written, was always returning a 0 when exiting from Checkspell() so that the code later on: handleInput = function (msg) { const spellRollTemplates = [ 'spell' , 'atk' , 'dmg' , 'atkdmg' ]; if (msg. type !== 'api' ) { if (msg && msg. rolltemplate && spellRollTemplates. includes (msg. rolltemplate )) { const roll = checkSpell (msg); const whisper = msg. target ; if (roll == 1 ) { const mSurge = makeSurge (); if (whisper == undefined) { sendChat (msg. who , mSurge); } else { sendChat (msg. who , `/w gm ${mSurge} ` ); sendChat (msg. who , `/w ${msg. who } ${mSurge} ` ); } return roll; } } } where roll is tested, always failed and so makeSurge() was never called. By putting the return in the above code, the value of "roll" was returned so the test would succeed when a 1 was rolled in the Checkspell() function. However, since I don't know how to get a pull request done on Github, I can't update the script with the fix. If someone can do this, or tell me how, I'd appreciate it. I've tested the new code and it works so I think the fix is correct. Thank you.