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

Breaking Macro when put in sheet

This is my first post on here but I'm banging my head on the wall right now. The roll macro keeps breaking when inside a button <button class="sheet-blank-roll-button" type="roll" value="?{Attack Type|         Advantage, ?{What stat|         Strength, +STR [[@{advantage}+@{str} ]] |         Dexterity, +DEX [[@{advantage}+@{dex} ]] |         Constitution, +CON [[@{advantage}+@{con} ]] |         Wisdom, +WIS [[@{advantage}+@{wis} ]] |         Intelligence, +INT [[@{advantage}+@{int} ]] |         Charisma, +CHA [[@{advantage}+@{cha} ]] |         }|         Disadvantage, ?{What stat|         Strength, +STR [[@{disadvantage}+@{str} ]] |         Dexterity, +DEX [[@{disadvantage}+@{dex} ]] |         Constitution, +CON [[@{disadvantage}+@{con} ]] |         Wisdom, +WIS [[@{disadvantage}+@{wis} ]] |         Intelligence, +INT [[@{disadvantage}+@{int} ]] |         Charisma, +CHA [[@{disadvantage}+@{cha} ]] |         }|         Normal, ?{What stat|         Strength, +STR [[@{normal}+@{str} ]] |         Dexterity, +DEX [[@{normal}+@{dex} ]] |         Constitution, +CON [[@{normal}+@{con} ]] |         Wisdom, +WIS [[@{normal}+@{wis} ]] |         Intelligence, +INT [[@{normal}+@{int} ]] |         Charisma, +CHA [[@{normal}+@{cha} ]] |         }         }" name="roll_defydanger"> The nested query part works fine in a macro but once I try to embed it in the sheet it just crashes. Thoughts?
1629807203
GiGs
Pro
Sheet Author
API Scripter
I think there's a bug with sheets at the moment when it comes to HTML entities. If I'm correct, you need to double encode them: replace each & with & and see if that works. Though looking at your code you may be able to simplify things and avoid the need for HTML entities with something like <button class="sheet-blank-roll-button" type="roll" value="[[?{Attack Type| Advantage,@{advantage}[Advantage]| Normal,@{normal}[Normal]| Disadvantage,@{disadvantage}[Disadvantage]} + ?{Which Stat?| Strength,@{str}[STR]| Dexterity,@{dex}[DEX]} ]]" name="roll_defydanger"> I didn't put all the stats in, to save my typing :)