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 works fine from 'Test Macro', but only produces a "#" when used from 'Macro Bar' ?

As title says - I have a basic macro adapted from a character sheet button (just switched the ability calls from specific to selected) and it runs fine when I use 'Test Macro' in the macro editor, but when I try and use the quick button from the macro bar, it just produces a # symbol in the chat panel.  What went wrong?  Macro is below (using the Symbaroum character sheet) Many thanks! Grim &{template:attack} {{name= @{selected|weapon1-name}}}{{attribute=[[@{selected|attack-ability1}+(?{Modifier +/-|0})+@{selected|weapon1-extra-attack}]]}}{{attribute1=[[@{selected|attack-ability1}+(?{Modifier +/-|0})+@{selected|weapon1-extra-attack}+1]]}} {{attack=[[1d20]]}} {{damage=[[@{selected|weapon1-dtype}+@{selected|weapon1-extra-dtype}+@{selected|weapon1-extra-damage}]]}} {{damage-crit=[[1d6]]}} {{character-name=@{selected|character-name}}} {{attack-type=[[@{selected|attack-ability1}]]}}
1602500050
Ziechael
Forum Champion
Sheet Author
API Scripter
What name did you give the macro? Might be handy to have a screenshot of the macro as set-up, there can sometimes be funkiness based on permissions etc but as the author of the macro I wouldn't expect anything like that in this instance...
1602500258
Oosh
Sheet Author
API Scripter
I'm not sure why that isn't working. It runs fine for me, copied and pasted straight into a macro and run from the bar. You can also simplify it a bit, and use the roll button call instead (it effectively does the same thing): %{selected|attack} If you want to use the rest of the Attacks list in the same way, they are part of a repeating section which is a little more complicated. Normally you can call them like this: %{selected|repeating_weapons_$0_attack} Unfortunately it's not working on this sheet - calling it from chat, the Attribute calls all grab the data from the first, non-repeating attack. So you have to go through and fill in all the Attributes with the repeating section info: &{template:attack} {{name=@{selected|repeating_weapons_$0_weapon1-name}}}{{attribute=[[@{selected|repeating_weapons_$0_attack-ability1}+(?{Modifier +/-|0})+@{selected|repeating_weapons_$0_weapon1-extra-attack}]]}}{{attribute1=[[@{selected|repeating_weapons_$0_attack-ability1}+(?{Modifier +/-|0})+@{selected|repeating_weapons_$0_weapon1-extra-attack}+1]]}} {{attack=[[1d20]]}} {{damage=[[@{selected|repeating_weapons_$0_weapon1-dtype}+@{selected|repeating_weapons_$0_weapon1-extra-dtype}+@{selected|repeating_weapons_$0_weapon1-extra-damage}]]}} {{damage-crit=[[1d6]]}} {{character-name=@{selected|character-name}}} {{attack-type=[[@{selected|repeating_weapons_$0_attack-ability1}]]}} So that would call the second attack, which is the first part of the repeating section, which starts counting from 0. The third weapon on the list, you would replace every instance of $0 in the above macro with $1.