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

Plugin crash

Comments in 'Plugin Development' started by Guillaume351, Mar 3, 2014.

  1. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    Hello. I have "
    [ERROR] A E_WARNING error happened: "yaml_parse(): parsing error encountered during parsing: did not find expected key (line 3, column 4), context while parsing a block mapping (line 2, column 1)" in "C:\Users\Guillaume\Desktop\Serveur TEST\src\utils\Config.php" at line 133 "

    with this part of code (I copy paste only the concerned part, but there is not only this. I'm sure it crash there, when creating config.).
    Thank you


    <?php

    /*
    __PocketMine Plugin__
    name=HappyMeal
    description=Have automatic meals
    version=1.0
    author=Guillaume351
    class=Test
    apiversion=12
    */

    class Test implements Plugin
    {
    private $api;

    public function __construct(ServerAPI $api, $server = false)
    {
    $this->api = $api;
    }

    public function init(){


    $this->config = new Config($this->api->plugin->configPath($this)."config.txt", CONFIG_YAML, array("INFO" =>"A meal size of 6 will hit 6*0,5 hearts without armor, but only 2*0,5 hearts
    with an armor !
    If Meal is false, no automatic meal :D",
    "check"=>true,
    "interval" =>10,
    "size" =>6,
    "Message" => "Test !",

    ));
  2. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Hmm, something is wrong with the YAML. Can you post all the code in[noparse]
    Code:
     blocks?
    [/noparse]

    EDIT: Fail

Share This Page

Advertisement