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

Minimum Zero in Macro

1599106345

Edited 1599106392
There are a couple of threads about this, but using their solutions doesnt seem to be working, and they are over 5 years old. I'm trying to write a macro that has a ROLL + ENTERED DMG VALUE - (ENTERED RESILIENCE - ENTERED AP) The (Resilience - AP) part needs to be minimum of zero though.  Right now if the AP is higher than resilience it results in a negative and thus increases the total damage result. Ive seen the following {(A-B),0}kh1 A = Resilience B = AP And that makes sense to me, but its not working.  Its just ignoring that part of the equation entirely and so ending up with ROLL + DMG =  Am I missing something?
1599108974
GiGs
Pro
Sheet Author
API Scripter
It;s hard to know what you're missing without seeing the exact code you are trying. Can you post that?