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

Can't get this macro to work

I have been working on a macro to make my weapon attack and damage rolls quicker at the table, but have not had a lot of success, though I can not find where my error is. If anyone can point out the problem I would greatly appreciate it.
1734777962

Edited 1734778196
?{Which Weapon |Shortsword, ?{Shortsword | Attack , ?{(Dis)Advantage | Advantage , Shortsword Attack [[{1d20,1d20}kh1+3]] | None , Shortsword Attack [[1d20+3]] | Disadvantage , Shortsword Attack [[{1d20,1d20}kl1+3]] } &@124; Damage , ?{Damage Buff? | None , Shortsword Damage [[{1d6+3]] Piercing | Divine Favor , Shortsword Damage [[1d6+3]] Piercing [[1d4]] Radiant | Hunter’s Mark , Shortsword Damage [[1d6+3]] Piercing [[1d6]] Force | Spirit Shroud , Shortsword Damage [[1d6+3]] Piercing [[1d8]] Radiant } } |Scimitar, ?{Scimitar | Attack , ?{(Dis)Advantage | Advantage , Scimitar Attack [[{1d20,1d20}kh1+3]] | None , Scimitar Attack [[1d20+3]] | Disadvantage , Scimitar Attack [[{1d20,1d20}kl1+3]] } &@124; Damage , ?{Damage Buff? | None , Scimitar Damage [[{1d6+3]] Slashing | Divine Favor , Scimitar Damage [[1d6+3]] Slashing [[1d4]] Radiant | Hunter’s Mark , Scimitar Damage [[1d6+3]] Slashing [[1d6]] Force | Spirit Shroud , Scimitar Damage [[1d6+3]] Slashing [[1d8]] Radiant } } |Rapier, ?{Rapier | Attack , ?{(Dis)Advantage | Advantage , Rapier Attack [[{1d20,1d20}kh1+3]] | None , Rapier Attack [[1d20+3]] | Disadvantage , Rapier Attack [[{1d20,1d20}kl1+3]] } &@124; Damage , ?{Damage Buff | None , Rapier Damage [[{1d8+3]] Piercing | Divine Favor , Rapier Damage [[1d8+3]] Piercing [[1d4]] Radiant | Hunter’s Mark , Rapier Damage [[1d8+3]] Piercing [[1d6]] Force | Spirit Shroud , Rapier Damage [[1d8+3]] Piercing [[1d8]] Radiant } } }
1734779864

Edited 1734780293
You've got commas and closing braces in the inline rolls within the nested queries. I'd recommend instead of starting with a query, to start with a chat menu for the different weapons, to reduce the nesting required, and then for whenever you need, replace the commas and the closing braces in inline rolls within queries with their html entities. There's also a few errors here and there you'll want to fix, like extra opening braces in inline rolls and a @ instead of a # on line 10. But the main culprit here is the commas and closing braces in the inline rolls. EDIT: Here's a tip - if your query breaks and shows an editable text field instead of a drop down menu, look at the end of the text section in the input field - where it cuts off, you'll find the spot where the query broke, meaning it encountered a problem character there when it shouldn't have.
Thanks, I got it working now. Should save me a lot of time in game on my turn.