PHP Fatal error: Call to a member function SavePlSettings() on a non-object in

Discussion in 'PHP' started by helldawg, Aug 12, 2012.

  1. #1
    I run my bot with this plugin and I get this.

    $bot->ld->SavePlSettings("KPD", $data);
    sleep(1);
    $bot->pm->RefreshMePlugin("KPD");
    $bot->SendMsg('DawgBox Finished');

    the red is the line with the error
     
    helldawg, Aug 12, 2012 IP
  2. ibnatu

    ibnatu Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    your object isn't instantiated...

    $bot = new NameOfObject; << whatever your objects name is, instantiate it.
     
    ibnatu, Aug 14, 2012 IP
  3. BRUm

    BRUm Well-Known Member

    Messages:
    3,086
    Likes Received:
    61
    Best Answers:
    1
    Trophy Points:
    100
    #3
    You forgot the argument list and parentheses:

    
    <?php
    $obj = new Class($args);
    ?>
    
    PHP:
     
    BRUm, Aug 18, 2012 IP