
Hi, I'm trying to roll the dice on roll20 and use the result, but I keep getting: undefined:1
$[[1]]
^
SyntaxError: Unexpected token $
at Object.parse (native)
at evalmachine.<anonymous>:176:26
at checkFinishedOps (
I'm using this javascript: sendChat('', '[[' + '26d6' + ']]', function(ops) {
log('test');
var rollResult = JSON.parse(ops[0].content);
log('rollResult: ' + rollResult);
});
If I instead send sendChat('', '26d6', function(ops) {
log('test');
var rollResult = JSON.parse(ops[0].content);
log('rollResult: ' + rollResult);
});
I get undefined:1
26d6
^
SyntaxError: Unexpected token d
at Object.parse (native)
at evalmachine.<anonymous>:171:26
at checkFinishedOps (
It never gets to 'test'. What am I doing wrong?