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

Config error?

Discussion in 'Development' started by Hoyee, Jun 17, 2020.

  1. Hoyee

    Hoyee Baby Zombie

    Messages:
    126
    I made if player someone dies, remove player's name from Yaml. but it doesn't work.

    Code:
    $p = $this->Pist->getAll();
    
        $config = new Config("Pist.yml", Config::YAML);
    
        $DeadPlayer = $Die->getPlayer()->getName();
    
        $config->remove("{$DeadPlayer}");
    
        $this->Pist->setAll($p);
        $this->Pist->save();
    ErrorException: "yaml_parse(): scanning error encountered during parsing: mapping values are not allowed in this context (line 2, column 7)" (EXCEPTION) in "src/pocketmine/utils/Config" at line 185
     
  2. Diduhless

    Diduhless Baby Zombie

    Messages:
    199
    GitHub:
    Diduhless
  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.