1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

$target wrong

Discussion in 'Development' started by bySentixPE, May 23, 2018.

  1. bySentixPE

    bySentixPE Spider Jockey

    Messages:
    37
    Hey Guys!
    Sorry for my bad english!
    Can anyone fix this line i dont have a error, but this line is wrong!

    $target = $this->getServer->getPlayer($args[1]);
     
  2. yuko fuyutsuki

    yuko fuyutsuki Slime

    Messages:
    77
    GitHub:
    fuyutsuki
    Could you show me the source code around that line? and if you got an error, please tell me that contents.
     
  3. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    the problem here is that you don't write the stantard function corretly:
    it should be like that:
    PHP:
    //before
    $target $this->getServer->getPlayer($args[1]);
    //after
    $target $this->getServer()->getPlayer($args[1]);
     
    RyanShaw likes this.
  4. byyEmirhanWSD

    byyEmirhanWSD Witch

    Messages:
    50
    GitHub:
    EmirhanWSD
    getServer is not property.
    Use;
    PHP:
    /** @var Server $server */
    $player $server->getPlayer($args[1]);
     
  5. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    PHP:
    $target $this->getServer()->getPlayer($args[1]);
     
  6. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Maybe he is using it from Main file
     
  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.