User Tools

Site Tools


elderscript_dice

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
elderscript_dice [2019/07/12 14:38]
dicenomiwiki [Reducers]
elderscript_dice [2019/07/12 15:23] (current)
dicenomiwiki [Reducers]
Line 133: Line 133:
 Also note that roll definitions are all parsed as a single value, so it is not uncommon to run into problems using the comparison operator in an if expression with a roll.  For example: Also note that roll definitions are all parsed as a single value, so it is not uncommon to run into problems using the comparison operator in an if expression with a roll.  For example:
  
-<code [enable_line_numbers="​true"​]>​+<​code ​stonescript ​[enable_line_numbers="​true"​]>​
 if 3d6 > 10 then if 3d6 > 10 then
   “Success”   “Success”
Line 142: Line 142:
 will always return “failure” because that if expression is actually testing “roll 3 six sided dice and count how many dice are showing a 10 or more” (which, of course, is impossible, so the result is always zero). ​ Instead you need to do: will always return “failure” because that if expression is actually testing “roll 3 six sided dice and count how many dice are showing a 10 or more” (which, of course, is impossible, so the result is always zero). ​ Instead you need to do:
  
-''​ 1. ''''​if (3d6) > 10 then''​ +<code stonescript [enable_line_numbers="​true"​]>​ 
- +if (3d6) > 10 then 
-''​ 2. '''' ​ ​“Success”''​ +  “Success” 
- +else 
-''​ 3. ''''​else''​ +  “Failure” 
- +end 
-''​ 4. '''' ​ ​“Failure”''​ +</​code>​
- +
-''​ 5. ''''​end''​+
 =====Putting it together===== =====Putting it together=====
  
elderscript_dice.txt · Last modified: 2019/07/12 15:23 by dicenomiwiki