Results 1 to 3 of 3

Thread: [VB6] Problem with Neo Login.

  1. #1

    Joined
    May 2013
    Posts
    760
    Thanks
    573
    Thanked
    646/331
    DL/UL
    19/1
    Mentioned
    251 times
    Time Online
    14d 3h 13m
    Avg. Time Online
    5m

    [VB6] Problem with Neo Login.

    I'm trying to make a Neo Login.
    One I run the program and try to login I get this error:


    Then when i click on debug, this is what it highlights:


    Here is my whole code:
    Code:
    Private Sub cmdLogin_Click()
    Dim strHTML As String
    
    strHTML = w.GetWrapper("http://www.neopets.com/login/")
    strHTML = w.PostWrapper("http://www.neopets.com/login.phtml", "destination=&username=" & User & "&password=" & Pass, "http://www.neopets.com/login/")
    
    If InStr(1, strHTML, "badpassword") Then
    MsgBox "Invalid Password/Username...", vbOKOnly, "ERROR"
    ElseIf InStr(1, strHTML, "this account has been ") Then
    MsgBox "This account has been frozen... :(", vbOKOnly, "ERROR"
    ElseIf InStr(1, strHTML, "index") Then
    MsgBox "You succesfully logged in as" & txtUser & "!", vbOKOnly, "ERROR"
    cmdLogin.Enabled = False
    cmdLogout.Enabled = True
    Else
    MsgBox "Unknown Error...", vbOKOnly, "ERROR"
    End If
    End Sub
    
    Private Sub cmdLogout_Click()
    Dim strHTML As String
    
    strHTML = w.GetWrapper("http://neopets.com/logout.phtml", "http://www.neopets.com/")
    strHTML = w.PostWrapper("http://www.neopets.com/logout.phtml", "http://www.neopets.com/")
    
    If InStr(1, strHTML, "index") Then
    MsgBox "Status:Logged Out", vbOKOnly, "YAY!"
    End If
    End Sub
    @(you need an account to see links), @(you need an account to see links)

    If anyone could tell me what I could be doing wrong, I would really appreciate it

  2. #2
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,722
    Userbars
    166
    Thanks
    5,907
    Thanked
    33,078/6,609
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 5h 38m
    Avg. Time Online
    3h 13m
    That means you are referencing an object that is not there. In this case it's your http wrapper, but from the pics I can see it on your form (the one with the "0" in it). Click on it and see if you named it "w" because that is what you are saying it is called in your code.

    PS: It's best to move on from VB6 and try VB.NET.
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  3. The Following 2 Users Say Thank You to j03 For This Useful Post:

    Duck4Cover (08-19-2013),Zachafer (08-19-2013)

  4. #3

    Joined
    May 2013
    Posts
    760
    Thanks
    573
    Thanked
    646/331
    DL/UL
    19/1
    Mentioned
    251 times
    Time Online
    14d 3h 13m
    Avg. Time Online
    5m
    Thanks, I got it fixed xD
    I've got VB.NET 2010 but I couldn't realy find too many guides/tutorials about it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •