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

Macro Selection Button Not Working

Can someone tell me what is wrong with this button. i thought i had it set right but it is still not working. i would appreciate it. <button type="roll" value="&{template:default} {{name=@{CharacterName} @{Psychic_Sleep_Name}}} {{?{Attack Type | 1st, Sanity=[[(4+@{Powers_Sanity_Reduction})]]}} {{Range=90ft/25(5x5)ft}} {{Hit Points=[[7d8r1]] Points}} {{{Duration=@{Psychic_Sleep_Duration}}} | 2nd, Sanity=[[(4+@{Powers_Sanity_Reduction})]]}} {{Range=90ft/35(7x7)ft}} {{Hit Points=[[7d8r1]] Points}} {{{Duration=@{Psychic_Sleep_Duration}}} | 3rd, Sanity=[[(5+@{Powers_Sanity_Reduction})]]}} {{Range=90ft/45(9x9)ft}} {{Hit Points=[[9d8r1]] Points}} {{{Duration=@{Psychic_Sleep_Duration}}} | 4th, Sanity=[[(6+@{Powers_Sanity_Reduction})]]}} {{Range=90ft/55(11x11)ft}} {{Hit Points=[[11d8r1]] Points}} {{{Duration=@{Psychic_Sleep_Duration}}} | 5th, Sanity=[[(7+@{Powers_Sanity_Reduction})]]}} {{Range=90ft/65(13x13)ft}} {{Hit Points=[[13d8r1]] Points}} {{{Duration=@{Psychic_Sleep_Duration}}} }}}"></Button>
1689276798

Edited 1689288579
GiGs
Pro
Sheet Author
API Scripter
The first thing is you are using HTML entities and not a chat menu . Snarky responses aside, the first thing I notice is before each Duration you have {{{ Shouldnt there only be two, like {{ Also, its not necessary, but I'd move the Sanity part outside the query, like <button type="roll" value="&{template:default} {{name=@{CharacterName} @{Psychic_Sleep_Name}}} {{Sanity=[[(?{Attack Type| 1st,4+@{Powers_Sanity_Reduction})]] Also, it looks like you have a linebreak before each |. I'd remove those. Keep the line break after the pipe (|), but remove the one before the pipe.
i did not see that thank you. also i did not know chat menu was a thing ill have to check that out.  i will try this later tonight thanks.
1689284033
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Chat Menus  are a user-facing macro technique, generally superior to nesting queries, and very powerful when using a  Macro Character Sheet .