Basically it's a simple die roller, only recognizing a d6. But it locks up and freezes my IRC window whenever it runs. I already know that there's some problem in it somewhere preventing it from running properly (it doesn't repeat properly in the while loop), but that still shouldn't be enough to crash my IRC.

Code:
on *:TEXT:!r*:#:{
  if $me == %bot {
    if ($$2 isnum) {
      if $$3 == d6 {
        set %i 1
        while %i <= $$2 {
          timer 1 2 set %outcome $rand(1,6)
          timer 1 3 msg #$chan %outcome
          timer 1 4 inc %i 1
        }
      }
    }
  }
}


I think it has to do with the loop running infinitely, I don't know. Maybe I'm just not seeing the obvious. Any ideas?

Last edited by Khaled; 28/07/10 08:25 PM.