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 .
×

Can't Figure Out Error

1583367490

Edited 1583367567
I am working on a custom sheet for the "Boy Problems" system. I put together a roll template that should show if a roll was successful or not but it doesn't seem to work. The template show the roll, the "your number", the text "Result:" but it doesn't seem to check the roll logic and show if the roll is successful. What am I missing here? <div class="sheet-container"> <div  class="sheet-ESTraitLine">     <table style="width:100%">         <tr>             <td>Name:</td>             <td><input type="text" name="attr_Name"style="width:95%"/></td>             <td>Pronoun(s):</td>             <td><input type="text" name="attr_Pronoun"style="width:95%"/></td>         </tr>         <tr>             <td>Style:</td>             <td><input type="text" name="attr_Style" style="width:95%"/></td>             <td>Role:</td>             <td><input type="text" name="attr_Role" style="width:95%"/></td>         </tr>     </table> </div> <div class="sheet-ESRolls">     <table style="width:100%">         <tr>             <td></td>             <td></td>             <td>Your Number</td>             <td></td>             <td></td>         </tr>         <tr>             <td><button type='roll' value='&{template:emotion} {{name=E•MO•TIONS}} {{roll=[[1d6]]}} {{number=@{YourNumber}}}' name='roll_Emotions'></button></td>             <td><< E•MO•TIONS <<</td>             <td><div><input type=text name="attr_YourNumber" /></div></td>             <td>>> SWORDS >></td>             <td><button type='roll' value='&{template:sword} {{name=SWORDS}} {{roll=[[1d6]]}} {{number=@{YourNumber}}}' name='roll_Swords'></button></td>         </tr>     </table> </div> <div class="sheet-Goal">     Character Goal:<input type="text" name="attr_Goal" style="width:98.5%"/> </div> <div class="sheet-Inventory">     Inventory: <textarea name="attr_inventory" style="width:97.5%"></textarea> </div> <div class="sheet-Legacy">         <table style="width:100%">             <tr>                 <td>Family:</td>                 <td>Known Asscoiates:</td>             </tr>             <tr>                 <td><textarea name="attr_Family" style="width:95%"></textarea></td>                 <td><textarea name="attr_KnownAssociates" style="width:95%"></textarea></td>             </tr>             <tr>                 <td>Enemies:</td>                 <td>Heirlooms:</td>             </tr>             <tr>                 <td><textarea name="attr_Enemies" style="width:95%"></textarea></td>                 <td><textarea name="attr_Heirlooms" style="width:95%"></textarea></td>             </tr>         </table> </div> <<rolltemplate class="sheet-rolltemplate-emotion">     <div class="container">         <div><h3>{{name}}</h3></div>         <div><span class="tcat">Roll: </span>{{roll}} | Your Number: <b>{{number}}</b></div>         <div>             <span class="tcat">Result: </span>             {{#rollGreater() roll number}}                 <b>SUCCESS</b>             {{/rollGreater() roll number}}             {{#rollLess() roll number}}                 <b>FAILURE</b>             {{/rollLess() roll number}}             {{#rollTotal() roll number}}                 <b>CUT TO THE FEELING</b>             {{/rollTotal() roll number}}             ??         </div>     </div> </rolltemplate> <<rolltemplate class="sheet-rolltemplate-sword">     <div class="container">         <div><h3>{{name}}</h3></div>         <div><span class="tcat">Roll: </span>{{roll}} | Your Number: <b>{{number}}</b></div>         <div>             <span class="tcat">Result: </span>             {{#rollGreater() roll number}}                 <b>FAILURE</b>             {{/rollGreater() roll number}}             {{#rollLess() roll number}}                 <b>SUCCESS</b>             {{/rollLess() roll number}}             {{#rollTotal() roll number}}                 <b>CUT TO THE FEELING</b>             {{/rollTotal() roll number}}         </div>     </div> </rolltemplate> </div>
1583370331

Edited 1583370367
GiGs
Pro
Sheet Author
API Scripter
A roltemplate treats everything as text, unless you coerce it into a number using inline roll brackets. So in your button, you need to wrap the number like so <button type='roll' value='&{template:emotion} {{name=E•MO•TIONS}} {{roll=[[1d6]]}} {{number= [[ @{YourNumber} ]] }}' name='roll_Emotions'></button>
GiGs said: A roltemplate treats everything as text, unless you coerce it into a number using inline roll brackets. So in your button, you need to wrap the number like so <button type='roll' value='&{template:emotion} {{name=E•MO•TIONS}} {{roll=[[1d6]]}} {{number= [[ @{YourNumber} ]] }}' name='roll_Emotions'></button> I had no idea to do that, it was driving me crazy. It's working now. Thank you so much.