Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Macro value error

I was trying to automate increased damage of cantrips on my 5e character sheet via macros using one like: [[((floor(((@{Pik-Nik Gearheart|level})+1)/6)+1))d10]] for firebolt. Up to d10 part [[((floor(((@{Pik-Nik Gearheart|level})+1)/6)+1))]] the macro works ok but when I add the d10 to this value it says Could not determine result type of: [{"type":"M","expr":"((floor(((0+0+0+0+0+0+0+8+0+0+0+1)+1)/6)+1))"},{"type":"C","text":"d10"}] it looks to me like the macro reads d10 value as text and not as dice input but well I don't know much about how these work. So any suggestions on how to fix this?
1427031352
Kryx
Pro
Sheet Author
API Scripter
From my experience you can't combine a floor when you use a variable number of dice. Because it is then an inline of an inline. I'd rework the math a bit to avoid a floor. [[(((10+1)/6)+1)d10]] Works for example
1427032563

Edited 1427032609
Wes
Pro
Sheet Author
This value was calculated Here Works like a charm!
Wes said: This value was calculated Here Works like a charm! thanks a lot, It really works great :)