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

help request with macro that creates a menu

Hello! I am attempting to create a menu that sends a value to the chat window from the choice.  At present, only the first two items appear in the menu that is created.  Would anyone be willing to take a quick look in case they see a simple error I may have made?   Thanks so much! Here is the macro: [[0d0 ?{AC of target material:|Cloth, + 11 [Cloth]|Crystal or glass or ice, + 13} [Crystal or glass or ice]|Wood or bone, + 15} [Wood or bone]}|Stone, + 17} [Stone]}|Iron or Steel, + 19} [Iron or Steel]}|Mithral, + 21} [Mithral]}|Adamantine, + 23} [Adamantine]} ]]
1467746857
The Aaron
Pro
API Scripter
Try this: [[0d0 ?{AC of target material:|Cloth, + 11 [Cloth]|Crystal or glass or ice, + 13 [Crystal or glass or ice]|Wood or bone, + 15 [Wood or bone]|Stone, + 17 [Stone]|Iron or Steel, + 19 [Iron or Steel]|Mithral, + 21 [Mithral]|Adamantine, + 23 [Adamantine]} ]] It looks like you had a bunch of extra } sprinkled in.
1467748785
Ziechael
Forum Champion
Sheet Author
API Scripter
Also, if there is one thing the macro wizard Silvyre has taught us all it is that if there is something common to all query results you are best putting it outside the query to prevent human error issues with the query results (i paraphrase but i think thats what he has taught me... lol): [[0d0 + ?{AC of target material:|Cloth, 11 [Cloth]|Crystal or glass or ice, 13 [Crystal or glass or ice]|Wood or bone, 15 [Wood or bone]|Stone, 17 [Stone]|Iron or Steel, 19 [Iron or Steel]|Mithral, 21 [Mithral]|Adamantine, 23 [Adamantine]} ]]
1467749148
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
also, unless you've only given us part of the macro or something, there's no reason to add that 0d0 in at the start. Inline rolls resolve straight numbers and math just fine. If you were using this in a kh/kl or some sort of other dice comparison function, then you'll need that 0d0.
Thanks everyone!!  :)