Microsoft VBScript compilation error '800a0410'
Invalid 'for' loop control variable
/forum/inc_func_common.asp, line 2092
for i=1 to len(Request.ServerVariables("URL"))
Here is the whole section of code:
if mLev=0 and inStr(fString,"[mp3") then
for i = 1 to len(fString)
if mid(fString,i,5)="[mp3]" then ij=i
if mid(fString,i,6)="[/mp3]" then
ik=i
if inStr(Request.ServerVariables("URL"),"/") then
for i=1 to len(Request.ServerVariables("URL"))
if mid(Request.ServerVariables("URL"),i,1)="/" then
strURL = mid(Request.ServerVariables("URL"),i+1)
end if
next
else
strURL = Request.ServerVariables("URL")
end if
left(fString,ij-1)+"<a href=""login.asp?target="& strURL &"""><img border=""0"" src=""images/members.bmp"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)
end if
next
strTempString=strTextString
end if
Microsoft VBScript compilation error '800a0410'
Invalid 'for' loop control variable
/forum/inc_func_common.asp, line 2092
for i=1 to len(Request.ServerVariables("URL"))
Here is the whole section of code:
if mLev=0 and inStr(fString,"[mp3") then
for i = 1 to len(fString)
if mid(fString,i,5)="[mp3]" then ij=i
if mid(fString,i,6)="[/mp3]" then
ik=i
if inStr(Request.ServerVariables("URL"),"/") then
for ji=1 to len(Request.ServerVariables("URL"))
if mid(Request.ServerVariables("URL"),ji,1)="/" then
strURL = mid(Request.ServerVariables("URL"),ji+1)
end if
next
else
strURL = Request.ServerVariables("URL")
end if
left(fString,ij-1)+"<a href=""login.asp?target="& strURL &"""><img border=""0"" src=""images/members.bmp"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)
end if
next
strTempString=strTextString
end if
Well, naturally. We are re-using/defining the variable "i" within a loop - can't do that. So simply change the second series of "i" variables to "ji" and the problem will go away.