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

Wrong Code output

Discussion in 'Development' started by bySentixPE, May 21, 2019.

  1. bySentixPE

    bySentixPE Spider Jockey

    Messages:
    37
    Why do this code output everytime "Dieser Spieler ist nicht Online" but the player is online?
    https://paste.ee/p/AxUHD
    Sorry IDK how i paste it here into php-lines so i think its better to put it into paste.ee
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Because of this comparison that doesn't make sense at all:
    PHP:
    if($args[1] == $this->getServer()->getPlayer($args[1])){
    I think this is what you want to do instead:
    PHP:
    if($this->getServer()->getPlayer($args[1]) !== null){
     
    Sandertv likes this.
  3. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    You just paste it here inside [ php ]
    PHP:
     tags
     
    HimbeersaftLP likes this.
  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.