I'm writing a script that outputs an inline roll via sendChat. I'll condense it to the important part. The following works fine: output += "<p><b>" + character.get("name") + ":</b> \[\[" + die + " + \@\{" + character.get("name") + "\|strength" + "\}\]\]</p>";
...
sendChat(msg.who, output); The following does not work. output += "<p><b>" + character.get("name") + ":</b> \[\[" + die + " + \@\{" + character.get("name") + "\|strength_saving_throw_mod" + "\}\]\]</p>";
...
sendChat(msg.who, output); The only difference: strength has a value of e.g. 16, whereas strength_saving_throw_mod is e.g. 3[str] + 3[proficient] + 0[global saving throw bonus] The error message I get is Could not determine result type of: [{"type":"M","expr":"10+3"},{"type":"L","text":"str"},{"type":"M","expr":"+3"},{"type":"L","text":"proficient"},{"type":"M","expr":"+0"},{"type":"L","text":"global saving throw bonus"}]
undefined
Oh mighty wisdom of the API subforum, how do I make this work? Extra caveat: in the end, I actually want to make the following work: output += "<p><b>" + character.get("name") + ":</b> \[\[" + die + " + \@\{" + character.get("name") + "\|" + attrMod + "\}\]\]</p>"; where attrMod is e.g. 'strength_saving_throw_mod'.