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 .
×

Ceiling function with a roll

Hello, I have little experience with working with HTML, but have been able to accomplish most of what I have attempted to do with it. Except this one thing although I cannot wrap my head around why this will not do what I would like it to I would like to have a system that deals slightly more or less damage than the base value of the roll MY CODE: <button type="roll" name="roll_attack" value="/em deals [[ceil@{attackdamage_troop}*((1d8/10)+0.55)]] damage! "></button> The ceil function does not.... function correctly Any help would be appreciated :) 
1636131035
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
It is a function. You need to wrap the arguments of the ceil call in parentheses. e.g. ceil(5/2)  would give 3. Doing it without the parentheses is just going to cause a syntaxerror in the roll parser.
Scott C. said: It is a function. You need to wrap the arguments of the ceil call in parentheses. e.g. ceil(5/2)  would give 3. Doing it without the parentheses is just going to cause a syntaxerror in the roll parser. I corrected it to this and it works as intended! Thank you! <button type="roll" name="roll_attack" value="/em deals [[ceil(@{attackdamage_troop}*((1d8/10)+0.55))]] damage! "></button>