Hi,
The problem am havng in the below script is that from %i = 4 onwards, the line $hget(search.results,%i).item keeps returning sresult.3 when it should return sresult.4, sresult.5 etc.
I have echoed the value of %i, & so for example for %i = 4 it should return sresult.4. even the mirc echo line in these cases says "* Added item 'sresult.4' to hash table 'search.results'" , but $hget(search.results,%i).item still returns sresult.3

THankyou
---------------

Code:
if (hget(search.results)) hfree -s search.results | echo 12 -a freeeeeedd!

  var %stok = 1
  var  %i = 1
  var %etok = %stok + %s.chunksize

  while (%stok < %total.search.toks) {
    echo 12 -a - stok = %stok , etok = %etok
    hadd -s search.results sresult. $+ %i $getbintok(&search.results,$+(%stok,-,%etok),44)
    echo 07 -a * i = %i , $hget(search.results,%i).item
    ; echo 13 -a results :  $hget(search.results,$+(sresult.,%i))
    var %stok = %etok
    var %etok = %stok + %s.chunksize
    inc %i
    echo 04 -a -- stok = %stok , total.toks = %total.search.toks
  }

halt