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

Need help debugging a macro.

For the life of me I can't see what is wrong with the following Macro.  I might be looking at it too closely.  Can someone spott my mistake? I want to be able to use this macro while i  have a clicked on the token of the chosen monster.  What I want is for the macro to return to me what the trait of the monster is.  I get the template.  I get the title of the trait in question but I never get the description.  Any help will be appreicated and I appologize in advance if this is not the place to put this.  I just didn't find a proper place to get a little help.  Macro follows: /w gm &{template:npcaction} {{name=@{selected|npc_name}}} {{rname=@{selected|repeating_npctrait_$0_name}}} {{description=@{selected|repeating_npctrait_$0_desc}}} For description I always get:  selected|repeating_npctrait_$0_desc Thanks,
1598746415

Edited 1598746510
Oosh
Sheet Author
API Scripter
The Attribute you want is @{selected|repeating_npctrait_$0_description} - if you get the attempted Attribute call printed out, instead of a value, it means the Attribute doesn't exist. You can use your browser's HTML inspector to get the correct name if in doubt, though the repeating sections can be a bit tricky to piece together if you're unfamiliar with the structure. _desc is a deprecated form of the Attribute, which still turns up in outdated macros quite a lot.
1598749779
GiGs
Pro
Sheet Author
API Scripter
Justt o add to oosh's comments: _desc used to be the correct ending for the attribute name, but the sheet developers changed it to _description pretty recently, and lots of people reported the same issue you have because they didnt do a good enough job of informing people of the change.
Thank you very much Oosh and GiGs.  That was real helpful.