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

Nested query @ Default template

Hello I got this nested query that locks on the child level after the double right curly braces, even if have already converted them into HTML entities. &{template:default} {{name=@{selected|character_name} • Ability}} ?{Type| Martial,?{Ability| 1,{{check=1}}| 2,{{check=2}}| 3,{{prova=3}}}| Magical,?{Ability| 4,{{check=4}}| 5,{{check=5}}| 6,{{check=6}}}| Scoundrel,?{Ability| 7,{{check=7}}| 8,{{check=8}}| 9,{{check=9}}}| Scholar,?{Ability| 10,{{check=10}}| 11,{{check=11}}| 12,{{check=12}}}} {{c=c}} I don't understand why, since I have replaced everything that could prevent it from going further in the parsing. I hope that it is something trivial, or else it means I got it completely wrong. Can anybody give me a hint?
After every roll query the HTML entities in your selection get converted. Since you have a nested query those double right curly braces are breaking the inner query when the outer query converts them from their HTML entity. To make it work you need to escape those braces a second time by replacing the & with its HTML entity so instead of }} for your double right curly braces use & #125; & #125;
RainbowEncoder said: After every roll query the HTML entities in your selection get converted. Since you have a nested query those double right curly braces are breaking the inner query when the outer query converts them from their HTML entity. To make it work you need to escape those braces a second time by replacing the & with its HTML entity so instead of }} for your double right curly braces use & #125; & #125; That's it! I didn't know I needed to convert the & too, thanks a lot anyway. Now the nested parts perfectly work. Only concern is at the very last line, that {{c=c}} is printed outside the template and not inside, as it was supposed to. What am I doing wrong?
Whilst carriage returns/new lines are supported inside the Roll Query syntax the resultant macro text has to all be on one line to work inside the template. So the {{c=c}} needs to be on the same line as the end of the roll query.
Thanks again :)
1617566158
Andreas J.
Forum Champion
Sheet Author
Translator
It might be easier for you to change this into a <a href="https://wiki.roll20.net/Chat_Menus" rel="nofollow">https://wiki.roll20.net/Chat_Menus</a> where a initial chat menu is posted when using the macro, and then from the menu you click and roll the specific option you want to use. Sure, it's an extra step, but better than not having a menu at all.