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

Macro and ACB setup syntax error

okay, so I'm building a command button and I took the "Dodge" attribute and rolled it in chat from the character sheet.  Then I hit up arrow and copied all that into a new ABILITY that I created on the character sheet called "Dodge1".  Then I built a macro as you see on the left.  I test the macro and it makes the button show up, but when I click on the button it gives me this: TypeError: Cannot read property 'substring' of undefined.        (what am I missing?)
You need to put the character's name before you call the ability. Also you should put the player's name in quotations if there are spaces in the name. Otherwise Roll20 looks for the Character whose name starts with "Juan" and sends the rest of the name as part of the message. /w "Juan Pablo Alejandro del Castillo de la Cruz" [Dodge](~Juan Pablo Alejandro del Castillo de la Cruz|Dodge1)
I appreciate the help.  I figured that out about the name.  Now the next step.  Why are my Ability Command buttons not working.  The error message I'm getting is something I don't understand.  
So when creating macros (global macros called within chat by using #MACRO) do not understand abilities unless you start the ability call with a keyword (selected, target, a specific character id, or a specific character name). So in your initial macro you did not have this keyword, so roll20 didn't know whose ability you were trying to use. If you put this keyword before the ability (such as [Dodge]](~CHARACTER_NAME|Dodge1) ) that should solve your problem.