Ok while testing to see if the my neopets login will work I get this "Compile Error: Block If without End If". How do I fix this.
Ok while testing to see if the my neopets login will work I get this "Compile Error: Block If without End If". How do I fix this.
You have no End If for any If statement and you should use ElseIf for addidtinnal checks. What wrapper are you using, you may want to use a referrer also?
Code:Private Sub Command1_Click() Dim strHTML As String strHTML = Wrapper.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtuser.Text & "&password=" & txtpass.Text & "&destination=%2petcentral.phtml/") If InStr(1, strHTML, "badpassword") Then Label1.Caption = " Invalid Password/Username " ElseIf InStr(1, strHTML, "this account has been ") Then Label1.Caption = " this account has been frozen " ElseIf InStr(1, strHTML, "petcentral") Then Label1.Caption = " Successful Login " Else Label1.Caption = " unknown error " Exit Sub End If End Sub
Last edited by Soredavide; 01-15-2012 at 07:02 AM.
I use Gluarks @(you need an account to see links)
edit: still says it
Last edited by w_is_awesome; 01-15-2012 at 07:10 AM.
Strange it works for me, I get the label to change to Successful Login. Did you use the code I posted or change yours?
Last edited by Soredavide; 01-15-2012 at 07:30 AM.
no but now i tryed and it came up with a debug error. on the code it shows a arrow pointing toward
"strHTML = Wrapper.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtuser.Text & "&password=" & txtpass.Text & "&destination=%2petcentral.phtml/")'
@(you need an account to see links)
I am not sure if you had the quotes around the statement or that is how you posted to this site? Make sure everything is named the way it is supposed to be, the wrapper is actually named wrapper (you should get an autocomplete if it is correct, with quite a few options for a drop down)
You can use the CODE tags to post code.
Code:strHTML = Wrapper.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtuser.Text & "&password=" & txtpass.Text & "&destination=%2petcentral.phtml/")
quotes where for website...
---------- Post added at 08:12 AM ---------- Previous post was at 06:55 AM ----------
Please close I figured it out from the help of soredivide