wesbaker / roll20-character-sheets

Character sheet templates created by the community for use in Roll20.
MIT License
4 stars 2 forks source link

leaving the "Effect Roll" empty causes a Syntax Error #7

Closed Pusikas closed 4 years ago

Pusikas commented 4 years ago

Some spells don't have an effect roll. It would be nice if the player could press the roll button, anyway, to indicate that they're casting the spell und post the description. Currently, this yields an error message like this: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but end of input found.

wesbaker commented 4 years ago

I think the best thing I can do is have two buttons: one would roll and one would display. Without having the API available you can’t put logic into the things that display in the chat. That’s easy enough to do though.

wesbaker commented 4 years ago

Alright, I have a solution I'm happy with. The buttons show or hide depending on the value in "Effect Roll"

Screen Shot 2020-05-24 at 2 12 11 PM Screen Shot 2020-05-24 at 2 12 28 PM
Pusikas commented 4 years ago

I like it!

wesbaker commented 4 years ago

Should go out Tuesday 🤞