Undefined property: pocketmine\entity\Zombie::$motion

Discussion in 'Development' started by Optima, Feb 10, 2019.

  1. Optima

    Optima Spider

    Messages:
    6
    Hello! Help me please

    Code:
    [15:25:14] [Server thread/CRITICAL]: ErrorException: "Undefined property: pocketmine\entity\Zombie::$motionX" (EXCEPTION) in "src/pocketmine/entity/Entity" at line 2207
    [
    
    My code:
    upload_2019-2-10_18-32-55.png
     
    Last edited: Feb 10, 2019
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,533
    GitHub:
    muqsit
  3. Optima

    Optima Spider

    Messages:
    6
  4. KielKing

    KielKing Zombie

    Messages:
    251
    GitHub:
    kielking
    like what muq said,
    PHP:
    /** @var Zombie $entity */
    $motion $entity->getMotion();
     
  5. DiamondGamer30

    DiamondGamer30 Baby Zombie

    Messages:
    168
    GitHub:
    diamondgamermcpe
    $motion is a protected property so you can not access it unless you are using it in a class that extends the class you want to use it in.
     
    wolfdale likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.