I'm having trouble nesting elseif statements together
(set: $variable to (random:1,6))
$variable
(if: $variable < 3) [Variable is 1 or 2]
(elseif: $variable is 3 or 4 or 5) [Variable is 3-5]
(elseif: $variable is 6) [Variable is 6]
I'm using above as a test to see if the code is behaving as I want. I want it to display message 1 if $variable is 1 or 2, message 2 if variable is anywhere from 3 to 5, and message 3 otherwise. INSTEAD what happens is this:
If $variable is anywhere from 1 to 5, it works properly. If $variable is 6, it displays the second message [Variable is 3-5] instead of the third [Variable is 6]
When I change all 3 statements to if statements, then whenever I roll a 6, BOTH message 2 and message 3 pop up, so I'm thinking my 3 or 4 or 5 isn't a good way to do it
I would appreciate any help or suggestions.
Thanks
Comments
it
keyword to continue to referencing the same variable: Since your variable is a number, you could also write that with different operators as: