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

help! SyntaxError: Expected

Hello I make a Marco( <a href="https://wiki.roll20.net/Complete_Guide_to_Macros_%26_Rolls#HTML_replacement" rel="nofollow">https://wiki.roll20.net/Complete_Guide_to_Macros_%26_Rolls#HTML_replacement</a> ) &amp;amp;{template:Ninpo&amp;#125;{{name=TRY&amp;#125;&amp;#125;{{target=[[?{NUMBER&amp;#125;+?{IS IT YOUR FEAR?&amp;#124;NO&amp;#44;0&amp;#124;YES&amp;#44;2&amp;#125;]]&amp;#125;&amp;#125;{{roll=[[2d6]]&amp;#125;&amp;#125;{{Effect=get card&amp;#125;&amp;#125; when I try its works but players can't rolls dice its write. SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|-], [+|-|*|/|%] or [0-9] but ")" found. I dont understand where is the problem. help me plz. I'm sorry. I'm not good at English
My only guess is that because theres a ton of html escapes in that macro that maybe the players or you are editing the macro and then hitting save with all the escapes missing.&nbsp;&nbsp;
1628176358

Edited 1628176427
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'm not sure why you have so many html replacements. Unless that macro text is nested in another roll query, you don't need any of the html replacements. Assuming that that macro is not nested in another query, it should look like this: &amp;{template:Ninpo} {{name=TRY}} {{target=[[?{NUMBER}+?{IS IT YOUR FEAR?|NO,0|YES,2}]]}} {{roll=[[2d6]]}} {{Effect=get card}} If it is nested in another query, can you share that query as well? Based on the error text, I don't see anywhere in the macro you shared that would cause the problem. Essentially, it's looking for a valid math expression, but it found an ending parentheses instead.