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

[Solved]$level->getOnlinePlayers()

Discussion in 'Development' started by kaliiks, Dec 21, 2016.

  1. VentroxStudio

    VentroxStudio Witch

    Messages:
    71
    And if it's loaded
     
    #A6543 likes this.
  2. VentroxStudio

    VentroxStudio Witch

    Messages:
    71
    PHP:
    if (file_exists($this->getServer()->getDataPath() . "/worlds/" "jl1"))
    {
    if(!
    $this->getServer()->isLevelLoaded("jl1")){
    $this->getServer()->loadLevel("jl1");
    }
    //Your code
    } else {
    //No Level found
    }
     
  3. kaliiks

    kaliiks Zombie

    Messages:
    250
    Oh thanks but
    yes exist
     
  4. VentroxStudio

    VentroxStudio Witch

    Messages:
    71
    Do you have an error with the code? Than send the code you used and the error
     
    #A6543 likes this.
  5. kaliiks

    kaliiks Zombie

    Messages:
    250
    [20:52:06] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected ' ' (T_STRING), expecting ',' or ')'" (EXCEPTION) in "myzip:///JumpLeague.zip#JumpLeague/src/JumpLeague/Main" at line 173
    LINE 173:
    PHP:
    if (file_exists($this->getServer()->getDataPath() . "/worlds/" "jl1"))
     
  6. VentroxStudio

    VentroxStudio Witch

    Messages:
    71
    PHP:
    if (file_exists($this->getServer()->getDataPath() . "/worlds/jl1")) {
     
    #A6543 likes this.
  7. kaliiks

    kaliiks Zombie

    Messages:
    250
    Problem is solved thanks to all!
     
  8. VentroxStudio

    VentroxStudio Witch

    Messages:
    71
    No problem :)
     
  9. Primus

    Primus Zombie Pigman

    Messages:
    749
    We usually say thanks by liking the content that was helpful.
     
    VentroxStudio likes this.
  10. imYannic

    imYannic Baby Zombie

    Messages:
    113
    Then it would be null, but it is unknown so he did not initialize it.
     
  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.