mIRC Homepage
Posted By: keeker finding all the hash talbles - 08/02/03 03:36 PM
Code:
 alias find_HT {
  window -ek0 @hashtables
  var %totalht $hget(0)
  while %totalht > 0 {
    var %httotal $hget(%totalht,0)
    while %httotal > 0 {
      aline 4 @hashtables $hget(%totalht,%httotal).data
      dec %httotal
    }
    dec %totalht
  }
  echo @hashtables Finished, hopefully
}
 
I wrote the above code to hopefully get a list of all the hash tables and the data contained in them, but its not working. I am still learning hash tables, and i seem to have made a mistake, it only prints out "Finished, hopefully". It doesn't print out any of the hash tables or the data in them, can yall help me?
Posted By: Hammer Re: finding all the hash talbles - 08/02/03 06:17 PM
Code:

alias find_HT {
  window -ek @HashTables
  var %tables = 1
  while $hget(%tables) != $null {
    var %table = $ifmatch
    var %item = 1
    while $hget(%table,%item).item != $null {
      aline 4 @HashTables $hget(%table) :: $ifmatch :: $hget(%table, $ifmatch)
      inc %item
    }
    inc %tables
  }
  aline @HashTables $chr(2)
  echo @HashTables Finished, definitely!
}
Posted By: keeker Re: finding all the hash talbles - 08/02/03 10:00 PM
thanks hammer.


"finished, definatly" lol i like that
© mIRC Discussion Forums