Code:
 on *:TEXT:@find*:#test:{
  var %i = 1
  while ($read(test.txt,%i)) {
    if ($2 isin $read(test.txt,%i)) {
      set %test. [ $+ [ $nick ] ] $addtok(%test. [ $+ [ $nick ] ],32) $read(test.txt,%i)
    }
    inc %i
  }
  if ($numtok(%test. [ $+ [ $nick ] ],32) > 0) {
    notice $nick found $numtok(%test. [ $+ [ $nick ] ],32) (found).
    var %i
    while ($gettok(%test. [ $+ [ $nick ] ],%i,32)) {
      if (%i > 5) { goto end }
      notice $nick $gettok(%test. [ $+ [ $nick ] ],%i,32)
      inc %i
    }
  }
  else {
    .notice $nick no text found
  }
  :end
  unset %test. [ $+ [ $nick ] ]
}  

This isn't my partion of code, it's code that a friend done, that doesn't work. I've kept playing around with what I had, and now it fails to work. I understand what I'm doing .. to an extent, not famaliar with $gettok $addtok or anything though. I'll doctor up my .. sloppy simple code and paste it once I return from class. Thanks again, and hope you're able to help. I know it's something so simple, I'm just overlooking.

Last edited by drc4; 22/11/05 05:41 PM.