napa182 commented on a Page, Rock Paper Scissors Game  -  Nov 05, 2008

it works fine for me

instead of this line

if ($calc( $regex( $2 ,rock) + $regex( $2 ,paper) + $regex( $2 ,scissors) ) != 1) { msg $chan [4 $+ $nick $+ ] You've got to choose Rock, Paper or Scissors! | halt }

you can use

if (!$regex($2,/^(rock|paper|scissors)$/i)) { msg $chan [4 $+ $nick $+ ] You've got to choose Rock, Paper or Scissors! | halt }

or

if (!$istok(rock paper scissors,$2,32)) { msg $chan [4 $+ $nick $+ ] You've got to choose Rock, Paper or Scissors! | halt }

they both work just fine.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.