I am making a game client, others use visual basic 6 to do this, the code works for them, but does not for me(I use VB 2005 .NET) This is a High Score retriver, the website uses smart parsing so it is difficult to parse the website code to find the numbers.
If you know both languages, please help in this, here is the code:
VB Code:
Function GetLvl(ByVal Username As String, ByVal Skill As String, ByVal HTML As String) As String Dim pos As Integer, tmpInet As Object If HTML = "" Then tmpInet = CreateObject("InetCtls.Inet") HTML = tmpInet.OpenURL("http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=" & Username) tmpInet.Cancel() End If pos = InStr(1, HTML, ">" & Skill & "<", 1) If InStr(pos, HTML, "t""", 1) > pos + 40 Then Exit Function pos = InStr(InStr(pos, HTML, "t""", 1) + 1, HTML, "t""", 1) + 3 GetLvl = Mid(HTML, pos, InStr(pos, HTML, "<") - pos) End Function
In the debugger, It has an error "Argument 'Start" must be greater than zero." So when I add "if pos = 0 then pos = 1" that skips that but comes upon another: "Argument 'Lenth' must be greater or equil to zero."
As of again please help.




Reply With Quote