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

How to fix this?

Discussion in 'Help' started by ynitaz_L, May 28, 2018.

  1. ynitaz_L

    ynitaz_L Spider

    Messages:
    6
    Ошибка:
    Предупреждение: file_put_contents (/ root / server / plugins / API // root / server / plu
    gins / SW / stats / win / shenkovdev987.yml): не удалось открыть поток: нет таких
    файла или каталога в /root/server/src/pocketmine/utils/Config.php o
    n строка 206
    Код:
    public function register($player, $password){
    $nickname = strtolower($player->getName());
    $client = $player->getClientId();
    $this->authplayer = new Config($this->getDataFolder() .'/auth/player/'.$nickname.'.yml', Config::JSON);
    $this->wins = new Config($this->getDataFolder() . "/root/server/plugins/SW/stats/win/".$nickname.".yml", Config::YAML);
    $this->kills = new Config($this->getDataFolder() . "/root/server/plugins/SW/stats/win/".$nickname.".yml", Config::YAML);
    $hash = $this->hashpassword($password);

    $this->setSession($player, false);
    $this->authplayer->set('player', $nickname);
    $this->kills->set('kills', 0);
    $this->wins->set('wins', 0);
    $this->wins->save();
    $this->kills->save();
    $this->authplayer->set('id', $client);
    $this->authplayer->set('password', $hash);
    $this->authplayer->save();

    $player->sendMessage('§aВы успешно зарегистрировались.');
    }
     
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    please write your question in english. (also use php tags)
     
  3. ynitaz_L

    ynitaz_L Spider

    Messages:
    6
    arning: file_put_contents(/root/server/plugins/
    API//root/server/plugins/SW_svile/stats/win/shen
    kovdev987.yml): failed to open stream: Is a dire
    ctory in /root/server/src/pocketmine/utils/Confi
    g.php on line 206
    stop
     
  4. ynitaz_L

    ynitaz_L Spider

    Messages:
    6
    Code:
    public function register ($ player, $ password) {
    $ nickname = strtolower ($ player-> getName ());
    $ client = $ player-> getClientId ();
    $ this-> authplayer = new Config ($ this-> getDataFolder (). '/ auth / player /'.$ nickname.'. yml ', Config :: JSON);
    $ this-> wins = new Config ($ this-> getDataFolder (). "/root/server/plugins/SW/stats/win/".$nickname.".yml", Config :: YAML);
    $ this-> kills = new Config ($ this-> getDataFolder (). "/root/server/plugins/SW/stats/win/".$nickname.".yml", Config :: YAML);
    $ hash = $ this-> hashpassword ($ password);

    $ this-> setSession ($ player, false);
    $ this-> authplayer-> set ('player', $ nickname);
    $ this-> kill-> set ('kill', 0);
    $ this-> wins-> set ('wins', 0);
    $ this-> wins-> Save ();
    $ this-> kills-> Save ();
    $ this-> authplayer-> set ('id', $ client);
    $ this-> authplayer-> set ('password', $ hash);
    $ this-> authplayer-> Save ();

    $ player-> sendMessage ('§aВыуспешно зарегистрировались.');
    }
     
  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.