Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

yaml_parse() error

Comments in 'Plugin Development' started by Artide, Oct 4, 2015.

Thread Status:
Not open for further replies.
  1. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    I'm getting an error about yaml_parse().
    PHP:
    public function resetBlockFromCFG($cf)
        {
            if(
    $cf !== null) {
                
    $cfg $this->getConfig()->get($cf);
                foreach (
    $cfg as $c) {
                    list(
    $world$x$y$z$blockId$meta) = explode(":"$c);
                    return 
    $this->getServer()->getLevelByName($world)->setBlock(new Vector3($x$y$z), Block::get($blockId$meta));
                }
    RuntimeException: "yaml_parse(): end of stream reached without finding document 0" (E_WARNING) in "/src/pocketmine/utils/Config" at line 143
  2. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    haven't you created a file next to src called recourses and in it created config.yml ?
  3. Intyre
    Offline

    Intyre Staff Member PocketMine Team

    Joined:
    Aug 24, 2013
    Posts:
    118
    Minecraft User:
    Intyre
    Use the search function on the forum, Google or any other search engine. This is a common mistake and asked over 9000 times.
    Falk likes this.
Thread Status:
Not open for further replies.

Share This Page

Advertisement