vb.net noob haz quezton 4 uz? plz helpz meh?

Discussion in 'World of SPAM' started by Fexxel, Jun 18, 2009.

  1. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    Code (Text):
    1.         Do While Timer1.Enabled = True
    2.             Dim strhtml As w.Request("GET", pages.SelectedIndex - 1, Wrapper.LastPage)
    3.             W.Request("GET", pages.SelectedIndex - 1, Wrapper.LastPage)
    4.             If strhtml.contains("random event") Then
    5.                 lstLog.Items.Add("RANDOM EVENT OCCURED!")
    6.             ElseIf strhtml.contains("battledome challenger") Then
    7.                 lstLog.Items.Add("NEW BATTLEDOME CHALLENGER")
    8.             ElseIf strhtml.contains("faerie quest") Then
    9.                 lstLog.Items.Add("FAERIE QUEST!!!")
    10.             End If
    11.             lstLog.Items.Add("Visited " + pages.SelectedIndex)
    12.             W.Pause(Timer1.Interval)
    13.         Loop
    Alright..

    Errors:
    Code (Text):
    1. Error   1   Array bounds cannot appear in type specifiers.  --THIS HIGHLIGHTS "GET" IN THE SECOND LINE
    2. Error   2   Name 'strhtml' is not declared.  -- highlights strhtml
    3. Error   3   Name 'strhtml' is not declared.
    4. Error   4   Name 'strhtml' is not declared.
    5.  
    I get it, I have to dim strhtml as something.
    Question is, what do I dim it as?
     
  2. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    I'll give u a hint on this one

    You're calling the request function from the wrapper.
    Here's the header of the function:

    Code (Text):
    1.     Public Function Request(ByVal Method As String, ByVal URL As String, ByVal Referer As String) As String
    2.  
    between the parenthesis is the parameter you gave when you called the function. What's after is what type of variable it will return. In this example, we use "Return strParts" and strParts is a string if you look at the wrapper

    Code (Text):
    1. Dim strParts As String()
    So your strHtml will need to be a string.

    Dim strhtml As String = w.Request("GET", pages.SelectedIndex - 1, Wrapper.LastPage)
     
  3. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    OMG OMG OMG <3 <3 <3 <3 <3 <3
    I <3 uz sooz much!!1
    ADDING LOVE POEM TO PROGRAM <3
    Whens your Birthday??? MUST GIVE PRESENT <3