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

Recursive Table Syntax Error

I'm not sure if the mod is running right or if I have written the script wrong but I get  SyntaxError: Expected "[" but "r" found. when I run  !rt /w gm [[Treasure-Ind0-4]].
1677714939

Edited 1677714956
You need to tell it how many times to roll: !rt / w gm [[1t[Treasure-Ind0-4]]]
oohh right thank you!
Could anyone tell me how to get the picture to come up when it rolls?
<a href="https://app.roll20.net/forum/post/5954076/script-update-recursivetables-now-with-rollable-table-images-and-better-prefixing-rules-for-roll-templates" rel="nofollow">https://app.roll20.net/forum/post/5954076/script-update-recursivetables-now-with-rollable-table-images-and-better-prefixing-rules-for-roll-templates</a> !rt [showicons] / w gm [[1t[Treasure-Ind0-4]]] !rt[showicons|iconlabel:off] /w gm [[1t[Treasure-Ind0-4]]]
Thank you Jarren! I'm having a problem now trying to stack marcos this is the script i am using: /w gm &amp;{template:default} {{name=Treasure and Rewards}} {{Treasure(0-4)=[Treasure-Ind(0-4)](!&amp;#13;#Treasure-Ind0-4)}} when i test the macro it pops up right but when i click the button in the chat it just dispays #Treasure-Ind(0-4 After testing the macro i noticed its removing the&nbsp; (!&amp;#13;# and leaving this:&nbsp; /w gm &amp;{template:default} {{name=Treasure and Rewards}} {{Treasure(0-4)=[Treasure-Ind(0-4)](! #Treasure-Ind0-4)}} Any ideas or could someone tell me what I'm doing wrong please?
I would suggest using a Macro Mule instead of collections macros. You can see what that kind of setup looks like for the standard D&amp;D 5E DMG treasure tables here:&nbsp; <a href="https://app.roll20.net/forum/post/10489371/creating-1-click-treasure-tables-in-roll20/?pageforid=10490102#post-10490102" rel="nofollow">https://app.roll20.net/forum/post/10489371/creating-1-click-treasure-tables-in-roll20/?pageforid=10490102#post-10490102</a>
1678499593
timmaugh
Forum Champion
API Scripter
Also, macros require a space after their name for the Roll20 parser to properly detect them.
1678499752
timmaugh
Forum Champion
API Scripter
So Jarren's suggestion is not only good for things like HTML replacements, portability between games, etc., it gets past the need for a space that I just mentioned... So, a lot of benefits.