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

Problems with a roll script

1481983936

Edited 1481983974
Hi Currently trying to find out what I'm doing wrong. I'm currently implementing a D6 charsheet and doing something like this here: value="/r (@{Physique} + @{athleticskilldice} + floor((@{athleticsskillpip} + @{Physiquepip})/3) - 1)d6 + 1d6! + @{athleticsskillpip} + @{Physiquepip} + (3 * floor((@{athleticsskillpip} + @{Physiquepip})/3))) Athletics"> Which results for example in this roll: /r 1d6!+(1 + 0 + floor((0 + 2)/3) - 1)d6+10 Now the problem is all that is right of this part: (1 + 0 + floor((0 + 2)/3) - 1)d6  is ignored (although 0d6 works fine if I do that). Thus only the 1d6! is getting taken. My question now is here: What am I doing wrong here?
It seems there is some connection to the floor function being there (but without it the formula doesnt work :/.  is there any workaround?
Been trying along with him, something seems wrong with the floor function.  It works just fine if we take that out and just do /r 1d6!+(1 + 0 + (0 + 2)/3 - 1)d6+10 or other variations thereof
1481985241

Edited 1481985336
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I believe you need to wrap the floor function in inline brackets. edit, actually try this: /r 1d6!+[[1 + 0 + floor((0 + 2)/3) - 1]]d6+10
That was it tnx.  means then its a order of thnigs problem. interesting!
1481992259
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Glad it worked