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

Please help :(

Comments in 'Plugin Development' started by DemtoxCraft, Sep 12, 2015.

  1. DemtoxCraft
    Offline

    DemtoxCraft New Member

    Joined:
    Aug 31, 2015
    Posts:
    7
    Minecraft User:
    DemtoxCraft
    [16:32:07] [Server thread/ERROR]: Could not load '/home/nentox/nentox/tserver/plugins/STL_v1.2.2.zip' in folder '/home/nentox/nentox/tserver/plugins/': yaml_parse(): parsing error encountered during parsing: did not find expected key (line 16, column 6), context while parsing a block mapping (line 14, column 5)


    can anyone text me to helt too fix this problem ?:)
  2. Barrington
    Offline

    Barrington New Member

    Joined:
    Jul 31, 2015
    Posts:
    41
    Minecraft User:
    Berrington
    Take away the plug STL_v1.2.2.zip
    Or see a mistake plug-in child class on line 14
    DemtoxCraft likes this.
  3. DemtoxCraft
    Offline

    DemtoxCraft New Member

    Joined:
    Aug 31, 2015
    Posts:
    7
    Minecraft User:
    DemtoxCraft
    line 1-20:
    PHP:
    <?php
       
       
    namespace nentox\stl;
       
       use 
    pocketmine\command\Command;
       use 
    pocketmine\command\CommandSender;
       use 
    pocketmine\command\ConsoleCommandSender;
       use 
    pocketmine\Player;
       use 
    pocketmine\plugin\PluginBase;
       use 
    pocketmine\utils\TextFormat;
       use 
    pocketmine\item\Item;
       use 
    pocketmine\utils\Config;
       
       class 
    Main extends PluginBase implements Listener{
         
         public function 
    onEnable() {
           if(!
    file_exists($this->getDataFolder() . "config.yml")) {
             @
    mkdir($this->getDataFolder());
             
    file_put_contents($this->getDataFolder() . "config.yml",$this->getResource("config.yml"));
             }
  4. Barrington
    Offline

    Barrington New Member

    Joined:
    Jul 31, 2015
    Posts:
    41
    Minecraft User:
    Berrington
    hmm
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    getResource returns a resource (stream for reading a file), not the file itself.
  6. DemtoxCraft
    Offline

    DemtoxCraft New Member

    Joined:
    Aug 31, 2015
    Posts:
    7
    Minecraft User:
    DemtoxCraft
    this is the Console Errore:
    Code:
    [22:53:39] [Server thread/INFO]: Enabling ZipPluginLoader v1.1.2
    [22:53:39] [Server thread/ERROR]: Could not load '/home/nentox/nentox/tserver/plugins/STL_v1.2.4_test.zip' in folder '/home/nentox/nentox/tserver/plugins/': yaml_parse(): parsing error encountered during parsing: did not find expected key (line 16, column 6), context while parsing a block mapping (line 14, column 5)
    [22:53:39] [Server thread/WARNING]: RuntimeException: "yaml_parse(): parsing error encountered during parsing: did not find expected key (line 16, column 6), context while parsing a block mapping (line 14, column 5)" (E_WARNING) in "/src/pocketmine/plugin/PluginDescription" at line 51
    [22:53:39] [Server thread/INFO]: Preparing level "world"
    
    this is the Main (line 10-25):
    PHP:
        use pocketmine\utils\TextFormat;
        use 
    pocketmine\item\Item;
        use 
    pocketmine\utils\Config;
       
        class 
    Main extends PluginBase implements Listener{
           
            public function 
    onEnable() {
                if(!
    file_exists($this->getDataFolder() . "config.yml")) {
                    @
    mkdir($this->getDataFolder());
                    
    file_put_contents($this->getDataFolder() . "config.yml",$this->getStream("config.yml"));
                    }
                
    $c yaml_parse(file_get_contents($this->getDataFolder() . "config.yml"));
                
    $this->line1 $c["line1"];
                
    $this->rankline1 $c["rankline1"];
                
    $this->line2 $c["line2"];
                
    $this->rankline2 $c["rankline2"];
    And this is the Config:
    Code:
    #####################################
    #         Config by nentox          #
    #####################################
    #                                   #
    #             Head-Line             #
    #headline: "Server Team List"       #
    #####################################
    #              Line 1               #
    
    #Team member
    line1: "Member"
    
    #Rank of the Team member
    rankline1: "Rank"
    
    #####################################
    #              Line 2               #
    
    #Team member
    line2: "Member"
    
    #Rank of the Team member
    rankline2: "Rank"
    
    #####################################
    #              Line 3               #
    
    #Team member
    line3: "Member"
    
    #Rank of the Team member
    rankline3: "Rank"
    
    #####################################
    
  7. Barrington
    Offline

    Barrington New Member

    Joined:
    Jul 31, 2015
    Posts:
    41
    Minecraft User:
    Berrington
    Add to the top of the config --- and in the end ...
  8. andre_the_gamer
    Offline

    andre_the_gamer Active Member

    Joined:
    Feb 5, 2015
    Posts:
    112
    Minecraft User:
    Andre_The_Gamer
    Try pasting this to the config and it should work
    ---
    #####################################
    # Config by nentox #
    #####################################
    # #
    # Head-Line #
    #headline: "Server Team List" #
    #####################################
    # Line 1 #

    #Team member
    line1: "Member"

    #Rank of the Team member
    rankline1: "Rank"

    #####################################
    # Line 2 #

    #Team member
    line2: "Member"

    #Rank of the Team member
    rankline2: "Rank"

    #####################################
    # Line 3 #

    #Team member
    line3: "Member"

    #Rank of the Team member
    rankline3: "Rank"

    #####################################
    ---
  9. DemtoxCraft
    Offline

    DemtoxCraft New Member

    Joined:
    Aug 31, 2015
    Posts:
    7
    Minecraft User:
    DemtoxCraft
    I try it tomorrow but thanks to all of you!:)
  10. andre_the_gamer
    Offline

    andre_the_gamer Active Member

    Joined:
    Feb 5, 2015
    Posts:
    112
    Minecraft User:
    Andre_The_Gamer
    Sure, :) tell me if it doesnt work and ill try to help more
    DemtoxCraft likes this.
  11. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Learn how to use code blocks, sheesh. *eyes burning*
    Andrey Nazarchuk likes this.
  12. DemtoxCraft
    Offline

    DemtoxCraft New Member

    Joined:
    Aug 31, 2015
    Posts:
    7
    Minecraft User:
    DemtoxCraft
    ?
  13. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
  14. DemtoxCraft
    Offline

    DemtoxCraft New Member

    Joined:
    Aug 31, 2015
    Posts:
    7
    Minecraft User:
    DemtoxCraft
    Yes I know but what's wrong?
  15. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Nothing, I'm just telling him to use a code block.
    Last edited: Sep 12, 2015
  16. DemtoxCraft
    Offline

    DemtoxCraft New Member

    Joined:
    Aug 31, 2015
    Posts:
    7
    Minecraft User:
    DemtoxCraft
    Ahhh now I see what do u meen:D


    Okay okay sorry Rambo I never asking again!: :) :'D
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Please say the things directly instead of adding do much negative and subjective meaning in your post. You are being extremely rude.

    It seems like it is that the plugin.yml is wrong?
    Andrey Nazarchuk and DemtoxCraft like this.
  18. andre_the_gamer
    Offline

    andre_the_gamer Active Member

    Joined:
    Feb 5, 2015
    Posts:
    112
    Minecraft User:
    Andre_The_Gamer
    Thanks @PEMapModder :)
    DemtoxCraft likes this.

Share This Page

Advertisement