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
This post has been closed. You can still view previous posts, but you can't post any new replies.

[Bugs] Macro tokenization sucks

1443733397

Edited 1443734038
Not sure if the devs would consider the following bugs but I certainly do... Here is a very simple macro: ?{TopLevel|Label 1,#macro|Label 2,?{value2|value2}} First of all why does the forum have to auto-translate the HTML entities I try to paste in?? Within a code snippet no less! I mean I have to escape the escape characters just so the bloody example displays properly! That's just silly. And now the bugs: 1. #macro fails, cuz for some reason there has to be a space after. Not mentioned in docs, certainly not mentioned as special syntax-wise. 2. When you open a macro for editing all escaped characters get translated to their literal characters. Imagine if made a big one and the only copy you preserved was the one you entered into the macro system. 3. When nesting macros, the special characters have to be escaped. This means that the same macro cannot be used standalone. It's like the entire macro system purposefully resists being logical.
Drop down queries were not intended to be used this way. Using HTML entities to get around the limitations is just that... a work around.
Even if they were not conceived to be used in that way, the functionality certainly still exists. And one could concievably write a preprocessor that makes things sensible, but why would you have to?
1443739169
The Aaron
Roll20 Production Team
API Scripter
As HB points out, the fact that you can use HTML Entities in this way is just a happy accident and is not a part of the intended functionality. &nbsp;Changes to the current behavior should be pursued through a suggestion in the Suggestions and Ideas Forum. I have tested the above example and typing the macro name in causes a space to be inserted unless I try very hard to avoid it. &nbsp;Thank you for highlighting this omition, I have a updated the documentation to reflect this requirement:&nbsp;<a href="https://wiki.roll20.net/Macros#Nesting_in_a_Roll_Query" rel="nofollow">https://wiki.roll20.net/Macros#Nesting_in_a_Roll_Query</a>