I'm trying to write a script that will read spell information from my custom SR2 character sheet and spit out all the relevant rolls into a default (for now) powercard. so the roll button sends this: !cast|@{character_name}|@{character_id}|@{spellname}|@{castforce}|@{will_aug}|@{drain}|?{How many dice are you taking for casting?|0}|?{How many dice are you taking to resist the drain?|0}|[[@{castTN}+2*(@{spellstack}+@{spellsus})+@{spellmisc}+@{stun_pen}+@{wound_pen}]] and all of the information is received properly based on my previous debug logging. The script then does the math to figure out what the target number should be and, in thoery, sends the rolls back to chat. cast: function(msg) { if (!msg.inlinerolls) return; var input = msg.content.split('|'); var charName = input[1]; var charID = input[2]; var spellname = input[3]; var force = input[4]; var will = input[5] var drainMod = input[6]; if (drainMod == '') drainMod = 0; var drainTN = Math.floor(force / 2) + drainMod; if (drainTN < 2) drainTN = 2; var castpool = input[7]; var drainpool = input[8]; var TN = msg.inlinerolls[0].results.total; if (TN < 2) TN = 2; var message = "&{template:default} {{name=" + spellname + "}} {{ Casting Test = [[ [" + force + "d6>" + TN + "!!] ]] }} {{ Pool Dice (Casting) = [[ [" + castpool + "d6>" + TN + "!!] ]] }} {{ Drain Test = [[ [" + will + "d6>" + drainTN + "!!] ]] }} {{ Pool Dice (Drain) = [[ [" + drainpool + "d6>" + drainTN + "!!] ]] }}"; log(message); sendChat("character|" + charID, message); } But as soon as I include the sendChat line, and click the button I get this error: ^SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but end of input found. I know that my problem isn't with formatting it into the card, because when I use the same message but with just text rather than the rolls it works fine, so it has to be the inline rolling. I've seen other scripts and threads here that use inline rolls in their output without error. Does anyone know how I can fix this without completely rewriting the output format? Cheers, Crazion