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

[Macro don't work as intended] Generic Attack Roll

Hi, i'm Rygel first time posting here, really new to roll20, but really addicted to coding... i was trying to do a "Generic Attack Roll" Macro, here the code: &{template:default} {{name=Attack Roll}} {{Character=@{selected|character_name}}} {{roll=[[?{Attack Type|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1}     + ?{Proficient?|Yes, @{selected|ProfBonus}|No, 0}      + ?{Melee or Ranged?|Melee, @{selected|strenght_mod}|Ranged, @{selected|dexterity_mod} ]]}} the problem is that if i remove the last line, all work fine, with it the response is only the purple "Attack Roll" ,,, and i don't know why..... thank you...
I guess it is not because you misspelt Strength?
1490658089

Edited 1490658263
only a typo rewriting it... in the macro is written right.
1490658196

Edited 1490658332
Remove the line breaks; Roll Templates cannot have line breaks between fields (but they can have line breaks within fields). Inline rolls cannot have line breaks (but line breaks within Roll Queries within inline rolls are fine). It's a bit finnicky...
1490658504

Edited 1490658830
i have done the line breaks for the forum legibility... now i will copy paste the macro below: &{template:default} {{name=Attack Roll}} {{Character=@{selected|character_name}}} {{roll=[[?{Attack Type|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} + ?{Proficient?|Yes, @{selected|ProfBonus}|No, 0} + ?{Melee or Ranged?|Melee, @{selected|strength_mod}|Ranged, @{selected|dexterity_mod} ]]}}
i have to specify that the Macro don't tells me that there is an error, only shows me the first purple line with the text.
You're missing a closing } on your 'Melee or Ranged?' Roll Query.
Silvyre said: You're missing a closing } on your 'Melee or Ranged?' Roll Query. Really... Thank YOU!...  i think it's to late for spotting a damn "}" i have to go to sleep. 
Definitely... Happy rolling!