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

Chat Menu - Ability Call

Hello, I've been trying to make a chat menu button for my battle master maneuvers. I get this message when calling the ability through the chat menu " TypeError: Cannot read properties of undefined (reading 'substring')" Chat Menu: &{template:default} {{name=Battle Master Manuevers}} {{Trip Attack=[Regular](~Mirtam "Tam" Unathoc|maneuverTrip!Crit) [Critical Hit!](~Mirtam "Tam" Unathoc|maneuverTripCrit)}} Ability: &{template:dmg} {{rname=Trip Attack}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[@{weapon_damage}[Weapon Damage] + @{superiority_dice}[Superiority Dice]]]}} {{dmg1type=Slashing}} {{save=1}} {{saveattr=vs. Strength}} {{savedesc=Maneuver Save}} {{savedc=[[@{maneuver_save_dc}]]}} {{desc=On a failed save, target is knocked prone}} {{hldmg=}} {{spelllevel=}} ammo={{charname=}} Crit version is the same except  {{dmg1=[[2@{weapon_damage}[Weapon Damage] + 2@{superiority_dice}[Superiority Dice]]]}} I didn't see whether the dmg template could determine if roll beforehand was a crit, and I had to remove the crit field to make the unused + go away. Thanks
I figured out what I was doing wrong. I was just pasting the Chat menu code into the chat, I need to make it an ability. Now everything is working great.
1668057966
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
One thing to look out for is the use of quotes in a character name. That can screw up some macros (and mod calls). In general, it's a good idea to avoid quotes and control characters in character names: [ ] { } ( ) ! @ # $ % ^ & | " '