Microsoft VBScript runtime error '800a005e'

Discussion in 'C#' started by princesuhaib, Oct 20, 2007.

  1. #1
    I am getting this error :

    Microsoft VBScript runtime error '800a005e'

    Invalid use of Null

    /Admin/function.inc, line 12


    this is my lines from 6-17

    for i = 1 to 10000
    begstr = "$r$"
    enstr= "$r$"
    beg = Instr(1,qstr,begstr,1) + len(begstr)

    if beg = len(begstr) then exit for
    en = Instr(beg + 1,qstr,enstr,1)
    if en = 0 then en = len(qstr) + 1

    rstr = mid(qstr,beg,en - beg)
    qstr=replace(qstr,"$r$" & rstr,"")
    resp(i)=right(rstr,len(rstr)-instr(1,rstr,"|",1))

    the red is line 12 please help me correct this thank you very much!
    Respectfully
    Suhaib
     
    princesuhaib, Oct 20, 2007 IP
  2. Forrest

    Forrest Peon

    Messages:
    500
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #2
    A great way to debug this kind of thing is change the line in red to:

    Respone.Write("beg:" + beg + "<br />qstr:" + qstr + "<br />enstr:" + enstr)

    This way you can see exactly what the problem is, then go back and fix it.
     
    Forrest, Oct 20, 2007 IP
  3. princesuhaib

    princesuhaib Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hey thank you very much! i got it now!!! :)
     
    princesuhaib, Oct 26, 2007 IP