<fieldset> <table> <tr> <th rowspan="4"><button type="roll" name="weapon_roll" value="&{template:attack}{{character= @{character_name}}}{{weapon= @{Weapon-Name}}}{{attack= [[1d20cs>@{Weapon-Critical} +[[@{Weapon-Attack_Bonus}]] ]]}} {{confirm= [[1d20 +[[@{Weapon-Attack_Bonus}]] ]]}} {{damage= [[@{Weapon-Damage-Dice}d@{Weapon-Damage-Size} + @{Weapon-Damage_bonus} + @{Weapon-Damage_Misc} + @{Weapon-Damage_Mod]]}}{{dmgcrit= [[(@{Weapon-Damage} + @{Weapon-Damage_bonus} + [[@{Weapon-Damage_Misc} + @{Weapon-Damage_Mod]])*@{Weapon-Critical_multiplier}]]}} {{details= @{Weapon-Special_Properties}}}">Weapon</button></th> <th>Name</th> <th>Atk Ttl</th> <th>BAB</th> <th>Bonus</th> <th>Misc</th> <th>Mod</th> <th align="center">Critical</th> <th>Size</th> <th style="width:50px;">SizeB</th> <th>Ammo</th> <th>Max</th> <th>Prof.</th> </tr> <tr> <td><input type="text" name="attr_Weapon-Name" value="" placeholder="Weapon"/></td> <td><input type="number" name="attr_Weapon-Attack_Bonus" value="[[@{Weapon-BAB}+@{Weapon-Attribute}+@{Weapon-Attack_Misc}+@{Weapon-Attack_Mod}+(@{weapon-prof}-4)]]" disabled='true'/></td> <td><input type="number" name="attr_Weapon-BAB" value="@{BAB}" disabled='true'/></td> <td> <select name="attr_Weapon-Attribute" > <option value="@{Strength-mod}" selected>Strength</option> <option value="@{Dexterity-mod}">Dexterity</option> <option value="@{Constitution-mod}">Constitution</option> <option value="@{Intelligence-mod}">Intelligence</option> <option value="@{Wisdom-mod}">Wisdom</option> <option value="@{Charisma-mod}">Charisma</option> </select> </td> <td><input type="number" name="attr_Weapon-Attack_Misc" value="0" style="width:50px;"/></td> <td><input type="number" name="attr_Weapon-Attack_Mod" value="0" style="width:50px;"></td> <td><input type="number" name="attr_Weapon-Critical" value="20" style="width:25px" max="20"/>/×<input type="number" name="attr_Weapon-Critical_multiplier" value="2" min="2" style="width:25px"/></td> <td><input type="text" name="attr_Weapon-Category" value="" placeholder="S/M/L" style="width:50px"></td> <td><input type="number" name="attr_Weapon-Size" value="@{Size}" disabled="true"/></td> <td><input type="number" name="attr_Weapon-Ammo" value="0" style="width:50px"/></td> <td><input type="number" name="attr_Weapon-Ammo-Max" value="floor(@{Clip-Size}/@{Weapon-Use})" style="width:50px" disabled="true"></td> <td align="center"><input type="checkbox" name="attr_weapon-prof" value="4" checked="true"/><span></span></td> </tr> <tr> <td colspan="3"><input type="text" name="attr_Weapon-Special_Properties" value="" style="width:100%"/></td> <td><input type="text" name="attr_Weapon-Damage-Dice" value="1" style="width:20px;"/>d<input type="text" name="attr_Weapon-Damage-Size" value="6" style="width:20px;">+<input type="text" name="attr_Weapon-Total-Damage" value="@{Weapon-Damage_bonus}+@{Weapon-Damage_Misc}+@{Weapon-Damage_Mod}" disabled="true" style="width:20px;"></td> <td colspan="2"><input type="text" name="attr_Weapon-Damage_Type" value="" placeholder="S/B/P etc." style="width:100px"></td> <td> <select name="attr_Weapon-Damage_bonus" style="width:60px;"> <option value="0">None</option> <option value="[[floor(@{Strength-mod}/2)]]">1/2 Str</option> <option value="[[@{Strength-mod}]]" selected>Str</option> <option value="[[floor(@{Strength-mod}*1.5)]]">1 1/2 Str</option> <option value="[[@{Strength-mod}*2]]">2x Str</option> <option value="[[floor(@{Dexterity-mod}/2]]">1/2 Dex</option> <option value="[[@{Dexterity-mod}]]">Dex</option> <option value="[[floor(@{Dexterity-mod}*1.5)]]">1 1/2 Dex</option> <option value="[[@{Dexterity-mod}*2]]">2x Dex</option> </select> </td> <td><input type="text" name="attr_Weapon-Damage_Misc" value="0" style="width:50px;"/></td> <td><input type="text" name="attr_Weapon-Damage_Mod" value="0" style="width:50px;"></td> <td><input type="text" name="attr_Weapon-Range" style="width:50px;"/></td> <td> <select name="attr_Clip-Size" style="width:50px;" > <option value="0" selected>None</option> <option value="25">Sm</option> <option value="50">SmE</option> <option value="50">Md</option> <option value="100">MdE</option> <option value="100">Lg</option> <option value="200">LgE</option> </select> </td> <td> <select name="attr_Weapon-Use" style="width:50px;" > <option value="1" selected>N/A</option> <option value="1">Low</option> <option value="0.5">LHM</option> <option value="2">Med</option> <option value="1">MHM</option> <option value="5">Hi</option> <option value="2.5">HHM</option> </select> </td> </tr> <tr> <th colspan="3">Special Properties</th> <th>Dmg</th> <th colspan="2">Type</th> <th>Bonus</th> <th>Misc</th> <th>Mod</th> <th style="width:50px">Range</th> <th style="width:50px">ECell</th> <th style="width:50px">Usage</th> </tr> </table> </fieldset> Attempting to use this code to roll for a random weapon results in the following messages on Roll 20: No attribute was found for @{Character|Weapon-Damage_Mod]]} No attribute was found for @{Character|Weapon-Damage} No attribute was found for @{Character|Weapon-Damage_Mod]])*@{Weapon-Critical_multiplier} TypeError: d is undefined I'm not sure what I did wrong, nor how to fix it.