Roll20APIScripts icon indicating copy to clipboard operation
Roll20APIScripts copied to clipboard

[Concentration] API script error when attempting to roll a check

Open benheise opened this issue 5 years ago • 0 comments

Using version0.1.16, imported by copy/pasting from raw github page into a new script, restarting API sandbox. This script worked correctly once for a PC sheet token. It autorolled the check just fine, and all was well. When I went to re-test by casting a spell, it correctly tracks and updates the spells and concentration, but this time it didn't roll when I clicked to check the roll. Switching to autoroll had the same issue. Restarted the API and reloaded and encountered the same issue. Deleted the script, re-imported, and restarted the API and still no success. Disabling other API scripts, reloading the API, and then attempting to use it also did not resolve the issue. Deleting the manually created script and importing the script using the roll20 toolbox resulted in the same issue.

The Roll20 Scipt API console reports the following error:

For reference, the error message generated was: Could not determine result type of: [{"type":"M","expr":1},{"type":"C","text":"d20cf<-1cs>-1+10"}]
undefined

It seems to refer to line# 260 in the sendChat() function.

    roll = (represents, DC, con_save_mod, name, target, advantage) => {
        sendChat(script_name, '[[1d20cf<'+(DC-con_save_mod-1)+'cs>'+(DC-con_save_mod-1)+'+'+con_save_mod+']]', results => {
            let title = 'Concentration Save <br> <b style="font-size: 10pt; color: gray;">'+name+'</b>',
                advantageRollResult;

benheise avatar Dec 27 '19 20:12 benheise