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

I can't call a macro from another macro

Hi, I'm trying to have multiple macros called from a single drop down menu and it doesn't seem to work at all. This wiki page: <a href="https://wiki.roll20.net/Macros#Roll_Query_Troubleshooting:_Call_Values" rel="nofollow">https://wiki.roll20.net/Macros#Roll_Query_Troubleshooting:_Call_Values</a> &nbsp;shows that you can call multiple macros in drop down. However, I tried the same thing with my own macros to no avail. ?{Choose a gun| Gun, #Magnum| Gun2, Nothing!} #Magnum is a macro like this: &amp;{template:default} {{name=.44 Magnum (AP Ammo)}} {{AP Single=4}} {{AP Targeted=5}} {{Attack roll= [[1d100cs&lt;6cf&gt;97]] vs [[101]]}} {{Damage = [[11+1d6]]}}{{.44 AP: -10 AC. Ignores DT}} {{Range: 6}} But whenever I run the first macro and select Gun it only prints #Magnum in the text. What am I doing wrong here?
1580122279
Ziechael
Forum Champion
Sheet Author
API Scripter
Your issue is that the macro that runs as a result of the query selection contains 'illegal' characters that cause it to fail. The Magnum macro would need to be: &amp;{template:default&amp;#125; {{name=.44 Magnum (AP Ammo)&amp;#125;&amp;#125; {{AP Single=4&amp;#125;&amp;#125; {{AP Targeted=5&amp;#125;&amp;#125; {{Attack roll= [[1d100cs&lt;6cf&gt;97]] vs [[101]]&amp;#125;&amp;#125; {{Damage = [[11+1d6]]&amp;#125;&amp;#125; {{.44 AP: -10 AC. Ignores DT&amp;#125;&amp;#125; {{Range: 6&amp;#125;&amp;#125; Note how the offending }} are replaced by the html&nbsp; &amp;#125; &amp;#125; &nbsp;as per the wiki, this will stop the macro from functioning directly as a macro call however so you need to weigh up the best approach for you. An alternative is to use a chat menu , it still has some complexity but nearly as much as a nested macro.
When I try to type the text you provided, Roll20 automatically converts the &amp;#125; to their corresponding characters and it still doesn't work.
1580188935
GiGs
Pro
Sheet Author
API Scripter
Roll20 doesnt do that conversion unless you reopen the macro. If you place that text in a macro, save it and close it, it will be fine. If you then open the macro, it will be immediately converted.
1580189173
GiGs
Pro
Sheet Author
API Scripter
You might find it worthwhile to look in the stupid tricks thread for Chat Menus , and Macro Character Sheet &nbsp;(the latter because Abilities on character sheets are just macros, but aren't subject to the html entity conversion).