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 with API Buttons in a Table

In this post, Bryan P describes how to make two columns of API buttons. <a href="https://app.roll20.net/forum/post/6009177/api-buttons-in-a-table" rel="nofollow">https://app.roll20.net/forum/post/6009177/api-buttons-in-a-table</a> I seem to be a little thick, as I can't figure out how to do it in an default template.&nbsp; Every attempt yields " TypeError: Cannot read property 'substring' of undefined" Anyone have a macro example?
1572149785

Edited 1572150000
GiGs
Pro
Sheet Author
API Scripter
Can you show what you've tried? We can modify that and make it work. The basic principle is &amp;{template:default} {{name=a title}} {{some text = some more text}} Replace "a title" with whatever your visible heading should be, replace "some text" with the stuff you want to appear in the left column, and "some more text" with what you want in the right column.
Appreciate the help.&nbsp; My error had nothing to do with the template and everything to do with pasting an ability macro into a collections macro without including 'selected'. This works exactly as I hoped, thanks! @{wtype}&amp;{template:default} {{name=Attacks &amp; Spellcasting}} {{[@{repeating_attack_$0_atkname}](~@{character_name}|repeating_attack_$0_attack) [@{repeating_attack_$1_atkname}](~@{character_name}|repeating_attack_$1_attack) [@{repeating_attack_$2_atkname}](~@{character_name}|repeating_attack_$2_attack) [@{repeating_attack_$3_atkname}](~@{character_name}|repeating_attack_$3_attack) [@{repeating_attack_$4_atkname}](~@{character_name}|repeating_attack_$4_attack) [@{repeating_attack_$5_atkname}](~@{character_name}|repeating_attack_$5_attack) &nbsp;= [@{repeating_attack_$6_atkname}](~@{character_name}|repeating_attack_$6_attack) [@{repeating_attack_$7_atkname}](~@{character_name}|repeating_attack_$7_attack) [@{repeating_attack_$8_atkname}](~@{character_name}|repeating_attack_$8_attack) [@{repeating_attack_$9_atkname}](~@{character_name}|repeating_attack_$9_attack) [@{repeating_attack_$10_atkname}](~@{character_name}|repeating_attack_$10_attack) [@{repeating_attack_$11_atkname}](~@{character_name}|repeating_attack_$11_attack) }}
1572164003
GiGs
Pro
Sheet Author
API Scripter
Great. If you omit the = in the last section, the buttons might flow better. You can get more than 2 per line, depending on the name, and they'll autofit to the chat width. I suggest trying it out and seeing if you like it. Also, since you're a Pro user, look up my Universal Chat Menus script or Scott's Menu Maker to handle automatic creation of buttons like those, for different sections of the character sheet.