Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
  1. #16
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    i got error
    Code:
    Error	1	Local variable 'resp' cannot be referred to before it is declared.	C:\Users\Owner\Documents\Visual Studio 2008\Projects\IP Banner\IP Banner\Module1.vb	14	39	IP Banner


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  2. #17
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Post your code, there's obviously an undeclared variable/function.

  3. #18
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by lolland View Post
    Post your code, there's obviously an undeclared variable/function.
    Yeah , You missed something, You get errors for double posting


     


     


     



    The Most complete application MPGH will ever offer - 68%




  4. #19
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    Code:
    Imports System.Net
    Imports System.IO
    Module Module1
    
    
        Public Function ShowIp() As String
    
            Dim uri_val As New Uri("https://innovatorsworldwide.com/MPGH/ip/myip.php")
            Dim request As HttpWebRequest = HttpWebRequest.Create(uri_val)
    
            request.Method = WebRequestMethods.Http.Get
    
    
            Dim readr As New StreamReader(resp.GetResponseStream())
            Dim resp As HttpWebResponse = request.GetResponse()
            Dim myip As String = readr.ReadToEnd()
    
            resp.Close()
    
            Return myip
        End Function
    
    End Module
    same exact code...


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  5. #20
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    You didnt declare resp (response)

    Edit: NVM You did


     


     


     



    The Most complete application MPGH will ever offer - 68%




  6. #21
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    so how i fix?

    EDIT: how i become invisible?


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  7. #22
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    /offtopic @ invisibility mode

    abacabaca (really fast) as your coming in the thread , it's the MK Forum Code

    /Ontopic

    Did you create a module or add the code to the form (not that it should matter, Depending on placement)


     


     


     



    The Most complete application MPGH will ever offer - 68%




  8. #23
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    module......


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  9. #24
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Works for me, just to be sure, add the reference system.net from the add reference menu


     


     


     



    The Most complete application MPGH will ever offer - 68%




  10. #25
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    ??? 0_0 ???


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  11. #26
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by mnpeepno2 View Post
    ??? 0_0 ???


    ...... Goto my Local Ip Tutorial, there is screenshots there for adding system.net reference

    https://www.mpgh.net/forum/33-visual-...-local-ip.html

    (Not that it should matter in this case, but to be safe)


     


     


     



    The Most complete application MPGH will ever offer - 68%




  12. #27
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    same error...


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  13. #28
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Oh, One sec, I see why
    Last edited by NextGen1; 01-25-2010 at 01:05 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  14. #29
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    maybe team viewer?


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  15. #30
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Nah, I got the reason

    "resp" isn't declared until line 2 in your code (from me, my fault)

    Code goes top to bottom when it comes to declarations

    So it should be

    Code:
             Dim resp As HttpWebResponse = request.GetResponse()
             Dim readr As New StreamReader(resp.GetResponseStream())
             Dim myip As String = readr.ReadToEnd()


     


     


     



    The Most complete application MPGH will ever offer - 68%




Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Favorite Quote
    By EleMentX in forum Spammers Corner
    Replies: 13
    Last Post: 01-04-2020, 04:36 PM
  2. MPGH PM Chat Quote Thread
    By arunforce in forum Entertainment
    Replies: 39
    Last Post: 05-12-2013, 08:24 PM
  3. When I quote people it quotes in my colour?
    By Hysteria in forum General
    Replies: 2
    Last Post: 10-14-2011, 08:46 AM
  4. MPGH AIM Chat Quote Thread
    By ace76543 in forum Entertainment
    Replies: 30
    Last Post: 09-25-2011, 12:14 PM
  5. MPGH IRC Chat Quote Thread
    By i eat trees in forum Entertainment
    Replies: 746
    Last Post: 07-02-2011, 10:07 PM