We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Advertisement Create a free account

Api call using inline rolls

I'm having issues using an inline calculated value inside of my api. The normal api call that works is !testing --sel --value 5 (which works for me). My problem is when I am trying to use an inline calculated value instead of 5. For example, !testing --sel --value [[@{selected|dexterity_mod} + @{selected|pb}]] but instead of seeing the value 5 in the api I am getting $[[1]]. Am I doing something wrong?
Forum Champion
I would try [[@{selected|dexterity_mod} + @{selected|pb} ]] or [[@{selected|dexterity_mod} + @{selected|pb} + 0d0 ]]
Turns out that api do not automatically use the inline calculation. In order to convert the api call to use the inline calculation I added the function from the  API:Cookbook processInlinerolls and use it to store the msg.content information which the rest of my api functions parse into their values.