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

Weapon Selection Macro Error

When I run the following macro, it gives me the results for all the weapons from the selected down. Macro #Weapon1 = @{selected|Name} attacks with @{selected|Weapon 1} [[1d20 + @{selected|Weapon 1 Mod} [Weapon 1 Mod] ]] | [[1d20 + @{selected|Weapon 1 Mod} [Weapon 1 Mod] ]] for [[@{selected|Weapon 1 Dmg} [Weapon1 Dmg] ]] damage Macro #Weapon2 = @{selected|Name} attacks with @{selected|Weapon 2} [[1d20 + @{selected|Weapon 2 Mod} [Weapon 2 Mod] ]] | [[1d20 + @{selected|Weapon 2 Mod} [Weapon 2 Mod] ]] for [[@{selected|Weapon 2 Dmg} [Weapon 2 Dmg] ]] damage Macro #Weapon3 = @{selected|Name} attacks with @{selected|Weapon 3} [[1d20 + @{selected|Weapon 3 Mod} [Weapon 3 Mod] ]] | [[1d20 + @{selected|Weapon 3 Mod} [Weapon 3 Mod] ]] for [[@{selected|Weapon 3 Dmg} [Weapon 3 Dmg] ]] damage ?{Which weapon?|@{selected|Weapon 1},#Weapon1 |@{selected|Weapon 2},#Weapon2 |@{selected|Weapon 3},#Weapon3 } If I select weapon1, it comes out as&nbsp; Macro #Weapon1 = Officer Tony Scafossa attacks with Truncheon&nbsp;<span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d20 + 4 [Weapon 1 Mod] = ( 17 )+4" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">21 &nbsp;|&nbsp;<span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d20 + 4 [Weapon 1 Mod] = ( 15 )+4" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">19 &nbsp;for&nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 1d6+2 [Weapon1 Dmg] = ( 2 )+2" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">4 &nbsp;damage Joab (GM): Macro #Weapon2 = Officer Tony Scafossa attacks with Revolver&nbsp;<span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d20 + 2 [Weapon 2 Mod] = ( 19 )+2" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">21 &nbsp;|&nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 1d20 + 2 [Weapon 2 Mod] = ( 19 )+2" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">21 &nbsp;for&nbsp;<span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d8 [Weapon 2 Dmg] = ( 5 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">5 &nbsp;damage Macro #Weapon3 = Officer Tony Scafossa attacks with Heavy Axe&nbsp;<span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d20 + 4 [Weapon 3 Mod] = ( 4 )+4" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">8 &nbsp;|&nbsp;<span class="inlinerollresult showtip tipsy-n-right fullcrit" original-title=" Rolling 1d20 + 4 [Weapon 3 Mod] = ( 20 )+4" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">24 &nbsp;for&nbsp;<span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d8+2 [Weapon 3 Dmg] = ( 6 )+2" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">8 &nbsp;damage #Weapon1 What am I missing?
1598386593
The Aaron
Roll20 Production Team
API Scripter
Macros are not created like that.&nbsp; You need to go to the collections tab on the top right, then create macros there with the name Weapon1, Weapon2, etc.&nbsp; and the content that you are trying to assign.&nbsp; You should then be able to call them with #Weapon1, etc.