I fixed that last part.
But I can't get the cooldwon to work
When I delete this part of the code
Code:
if (%comwait) return
else set -u6 %comwait 1

everything works fine, but when it's in the script all the code after it just doesn't work.


Code:
ON !*:TEXT:!*:#: {
  tokenize 32 $strip($1-,burci)
  if ($1 == !quote) {
    if (!$2) { quote random }
    elseif ($2) { quote $2- }
  }
}
alias quote {
  if ($1 == add) { 
    if ($nick !isop #) { return }
    var %n $ini(quotes.ini,#,0)
    inc %n 
    writeini quotes.ini # %n $2-
    msg # Quote $chr(35) $+ %n added. Use !quote $chr(35) $+ %n $+ .
  }
  elseif ($1 == edit) {
    if ($nick !isop #) { return }
    var %2 $remove($2,$chr(35))
    if (%2 isnum) {
      writeini quotes.ini # %2 $3-  
      msg # Quote $chr(35) %2 updated.
    }
  }
  else {   
    if (%comwait) { return }
    else {
      set -u6 %comwait 1
      var %1 $remove($1,$chr(35))
      if (%1 !isnum) { 
        if (%1 == random) {
          var %n $ini(quotes.ini,#,0)
          var %rng $rand(1,%n)
          msg # $chr(35) $+ %rng $+ : $readini(quotes.ini,n,#,%rng)
        }
        else { 
          if ($nick !isop #) { return } 
          var %n $ini(quotes.ini,#,0)
          var %i 1
          while (%i <= %n) {
            var %read $readini(quotes.ini,n,#,%i)
            if ($1- isin %read) msg # $chr(35) $+ %i $+ : $v2
            inc %i
          }
        }
      }
      elseif (%1 isnum) { msg # $chr(35) $+ %1 $+ : $readini(quotes.ini,n,#,%1) }
    }
  }
}


Did I miss something?