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 and Rollable Table Question

1516894692

Edited 1516894720
Tom
Pro
Sheet Author
So I'm trying to build a macro for a rollable table inside a roll template.  Easy enough.  But one of things I want it to do is query for a number of rolls off the same table (preferably in a drop down menu).  This has proved to be pretty tricky.  Any ideas how to do it?  Here is what I tried: /w gm &{template:default}  {{name=Ship's Cargo}}  {{In Hold= ?{Cargo Units | 1, 1t[[Cargo]] | 2, 1t[[Cargo]] 1t[[Cargo]] | 3, 1t[[Cargo]] 1t[[Cargo]] 1t[[Cargo]] }} So what is my mistake here?  Or is there a better way to do this?
You need to put each table roll inside an inline calculation ([[ ]]). Also you have an extra [ ] around the table call. /w gm &{template:default}  {{name=Ship's Cargo}}  {{In Hold= ?{Cargo Units | 1, [[1t[Cargo] ]] | 2, [[1t[Cargo] ]] [[1t[Cargo] ]] | 3, [[1t[Cargo] ]] [[1t[Cargo] ]] [[1t[Cargo] ]] }}
1516897784

Edited 1516898179
Tom
Pro
Sheet Author
Hmm...ok.  When I do that, I get the template name but nothing else.  Hrmm. edit: AHA!  I Needed to add extra brackets, in front of "?{Cargo" and at the very end.  Works great now!  Thank you, Kyle!