Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Error
Results 1 to 7 of 7

Thread: Error

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    25

    Error

    Hey, i'm getting an error at this line:
    Dim myArray() As String = ListBox1.SelectedItem.ToString().Split(",")

    It says: NullReferenceException Was Unhandled.
    I'd love getting a answer why i'm getting this error.

    This is a code line of a "Bot Walker"
    I can create waypoints, but when i'm trying to start it, this error pops up.

    I'm using TibiaAPI (2.9.6?) that supports 8.6.
    -Umbled.

  2. #2
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: Error

    ListBox1.SelectedItem is probably null, add some sanity checks to prevent the error

  3. #3
    Junior Member
    Join Date
    Aug 2012
    Posts
    25

    RE: Error

    Quote Originally Posted by Blaster_89
    ListBox1.SelectedItem is probably null, add some sanity checks to prevent the error
    I respect all of your help, i really do.
    But im new here, could you please change the code for me or something?
    I don't understand a shit actually ;p

  4. #4
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: Error

    [code=c#]
    object obj = ListBox1.SelectedItem;
    if (obj != null)
    {
    // parse the object
    }
    [/code]

  5. #5
    Junior Member
    Join Date
    Aug 2012
    Posts
    25

    RE: Error

    Quote Originally Posted by Blaster_89
    [code=c#]
    object obj = ListBox1.SelectedItem;
    if (obj != null)
    {
    // parse the object
    }
    [/code]
    Where should i put that in?
    haha, i know im noobish :s

  6. #6
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: Error

    Quote Originally Posted by Umbled
    Quote Originally Posted by Blaster_89
    [code=c#]
    object obj = ListBox1.SelectedItem;
    if (obj != null)
    {
    // parse the object
    }
    [/code]
    Where should i put that in?
    haha, i know im noobish :s
    You should learn at least the basics before attempting what you're doing

  7. #7
    Junior Member
    Join Date
    Aug 2012
    Posts
    25

    RE: Error

    Quote Originally Posted by Blaster_89
    Quote Originally Posted by Umbled
    Quote Originally Posted by Blaster_89
    [code=c#]
    object obj = ListBox1.SelectedItem;
    if (obj != null)
    {
    // parse the object
    }
    [/code]
    Where should i put that in?
    haha, i know im noobish :s
    You should learn at least the basics before attempting what you're doing
    I know, i know, but couldn't you atleast try?
    [hr]
    NVM, solved 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
  •