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 Help]

So the following macro doesn't work and I don't know why... Macro: attack /roll d20+ @{BASE attack bonus} + @{WeaponBonus} + @{StrengthMod} Every time I do this I get the following reply: TypeError: Cannot call method 'toLowerCase' of undefined Doesn't quite make sense to me.. I already double checked the spelling of the attributes. I program for a living so I normally feel pretty smart when it comes to this stuff.. But I don't really have this one figured out. Lemme know if you can help at all
Macros aren't automatically bound to a sheet, so you have to specify what object to pull the attribute from. /roll d20+ @{SheetName|BASE attack bonus} + @{SheetName|WeaponBonus} + @{SheetName|StrengthMod} Alternatively, if you create it as an Ability on the character sheet, it will always refer to itself so you can use your original method and choose to show it on the macro bar or as a Token Ability (assuming the sheet is bound to a token) Between the two options, using a sheet ability is more portable. A general macro will break if your character sheet name changes and you'd have to replace the SheetName if you wanted to use the macro on another character or share it with someone.
This is a characters ability already so I have ignored the SheetName part :I That's where the confusion is coming from
I tried your macro in one of my campaigns and it works fine. I haven't even been able to replicate that particular error by purposely breaking it. You may need one of the mods to check your campaign. Also, try a different browser if you haven't already. Your syntax and general idea should work.
It wasn't working yesterday and it worked today without changing anything @_@ Thanks for trying to help anyway
Glad you got it fixed =).