Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Whats wrong?

Comments in 'Plugin Development' started by JackboyPlay, Apr 1, 2016.

Thread Status:
Not open for further replies.
  1. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    PHP:
    [08:58:47criticalError"Call to a member function teleport() on null" (EXCEPTIONin "/Jump/src/JackboyPlay/Jump/Main" at line 143[08:58:47criticalCould not execute task JackboyPlay\Jump\JumpCall to a member function teleport() on nullNoticeUndefined offset0 in /root/benhosting/plugins/Jump/src/JackboyPlay/Jump/Main.php on line 143
    Code at line 143
    PHP:
       $this->getOwner()->getServer()->getPlayer($this->getOwner()->jump1[0])->teleport(new Position(-70110900));
    Output from var_dump
    PHP:
    array(1) {
    [
    "Jackitomato"]=>
    bool(true)
    }
    Last edited by a moderator: Apr 1, 2016
  2. Intyre
    Offline

    Intyre Staff Member PocketMine Team

    Joined:
    Aug 24, 2013
    Posts:
    118
    Minecraft User:
    Intyre
    Learn to use Google. Learn to read errors. Learn to understand errors.

    PS:
    Learn to edit your posts! 3 posts with one line or one post with 3 lines.....
    Making descriptive titles!
  3. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    I hate it if you answer on my threads -.- next time I wai if you are offline
  4. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Hey! That's a moderator. He can easily ban you.
    But for your question: You don't have the player object. You need it. And now google 'get player object site:forums.pocketmine.net'
    (Apperently the player is not online, but we don't know what the array jump1[0] holds, so we cannot help you)
  5. Intyre
    Offline

    Intyre Staff Member PocketMine Team

    Joined:
    Aug 24, 2013
    Posts:
    118
    Minecraft User:
    Intyre
    You can hate it or learn from it. This kind of error is very common. Google found "About 358 results (0,36 seconds)".

    If you want to make a plugin you must learn and understand the language (PHP), not scared to search with Google and read a lot.

    PS: I'm always online.. Will you stop posting now? :p
    PEMapModder likes this.
  6. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    I'll hack you account and delete it and then you are forever offline muhaha xD
  7. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    I've made it with $this->getServer()->getOwner()->getPlayer($this->getOwner()->jump1[0])->teleport(900, 9, 9);
    and it doesnt work
  8. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    var_dump($this->getOwner()->jump1[0]);
    var_dump($this->getOwner()->getPlayer(jump1[0]));
    PEMapModder likes this.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    BTW it appears that you are not using PocketMine?
    jojoe77777 likes this.
  10. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    PHP:
    [12:55:55criticalError"Call to undefined method JackboyPlay\Jump\Main::getPlayer()" (EXCEPTIONin "/Jump/src/JackboyPlay/Jump/Main" at line 131[12:55:55criticalCould not execute task JackboyPlay\Jump\JumpCall to undefined method JackboyPlay\Jump\Main::getPlayer()
Thread Status:
Not open for further replies.

Share This Page

Advertisement