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

Pathfinder Macro Shortcut

I have a macro for attacking with my rogue's sneak attack under my class features. If I click the roll button there, it rolls correctly. What I want to do is make a shortcut #sneakattack so that I don't have to constantly go into my sheet to roll it. If I copy/paste the working class feature macro, testing it from the shortcut gives me "TypeError: Cannot read property 'substring' of undefined" Could someone with more macro experience tell me where I'm going wrong? This is the macro that works when I click the roll button in the Class Features and Abilities: &{template:pf_attack} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=Sneak Attack with @{repeating_weapon_$0_name}}} {{attack=[[ 1d20cs>[[ @{repeating_weapon_$0_crit-target} ]] + [[ @{repeating_weapon_$0_total-attack} ]] ]] vs AC}} {{crit_confirm=[[ 1d20 + [[ @{repeating_weapon_$0_total-attack} ]] ]] vs AC}} {{damage=[[ @{repeating_weapon_$0_damage-dice-num}d@{repeating_weapon_$0_damage-die} + [[ @{repeating_weapon_$0_total-damage} ]] + 1d6 ]]}}  {{crit_damage= [[ [[ (@{repeating_weapon_$0_damage-dice-num} * (@{repeating_weapon_$0_crit-multiplier} - 1)) ]]d@{repeating_weapon_$0_damage-die} + [[ (@{repeating_weapon_$0_total-damage} * (@{repeating_weapon_$0_crit-multiplier} - 1)) ]] ]]}} {{type=@{repeating_weapon_$0_type}}} {{description=@{repeating_weapon_$0_notes}}}
1455089716

Edited 1455090532
Attributes [within macros] saved under the My Settings tab of the Sidebar (or typed directly into the text chat), require a keyword (which identifies which Character they belong to). Of the three keywords available, I recommend, for your usecase, either the Character Name keyword (e.g. @{Your Character's name|AttributeName}), or the selected keyword (e.g. @{selected|AttributeName}). Attributes within macros saved as Abilities do not require keywords. You could opt to create an Ability on the Attributes & Abilities tab of your rogue's Character without modifying the macro code. If, for example, that Ability is named "SneakAttack", and the name of your rogue's Character is "Sarah", you could save the Ability call %{Sarah|SneakAttack} as a macro under My Settings.