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

What's the difference between macros under the Collection tab and macros on the character sheet?

I admit I am a complete noob at Roll20. I want to write a macro under the Collection tab, but when I paste a "template" from my character sheet, I get an error message. Here is the macro: &{template:general} {{name=@{character_name}}} {{Weapon=@{WeaponName}}} {{attack1=[[1d20]]}} {{damage1vsSM=[[1d6]]}} {{damage1vsL=[[1d6]]}} @{whisper_to-hit} Here is the error message: TypeError: Cannot read property 'substring' of undefined. What's the difference between macros under the Collection tab and macros on the character sheet? Why does the macro work fine on my character sheet, but it returns an error message if I try to run in from the bar or chat window?
1498976094
vÍnce
Pro
Sheet Author
Macros on the sheet and token ability macros "assume" the attributes are for the character/sheet the rolls are being rolled from or linked to.  You need to include "who's" attributes you want when making global macros.  A simple method is to use target,  select, or the character's name in the attribute call. ie  @{ select| character_name} @{ target| character_name} @{ Bob| character_name}
Generally, macros in the Collections tab and on the Macro Quickbar belong to the player , and need some way to identify the character or token they apply to, as Vince indicates above. Macros and Abilities on a sheet belong to the character on that sheet . Note that if you drag a button from a sheet to the Macro Quickbar, it will include the character's name in the macro, so even though it is on the Quickbar, it still belongs to the character.
Thank you so much. I wrote the macros I wanted, just stuck them in weapon's slots (whether they were for weapons, or not) and dragged the buttons to the macro bar. End of problem. I can use the exact same macros for multiple characters with zero editing AND I don't have to worry about selecting my token. Thanks again.
1499011365
vÍnce
Pro
Sheet Author
Where there's a will... Nice workaround.