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

onLoad() Error

Comments in 'Plugin Development' started by HyperFuse, Jun 28, 2015.

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

    HyperFuse Banned

    Joined:
    Jun 22, 2015
    Posts:
    7
    Minecraft User:
    HyperFuse
    http://hastebin.com/wocozevani.vbs as you can see im getting an E error when attemping to load my plugin... The plugin is in the folder /src/test/test.php
    PHP:
    <?php

    namespace test;

    use 
    pocketmine\plugin\PluginBase;

    class 
    test extends PluginBase{

         public function 
    onEnable() {
                
    $message2 "This server runs DarkRealms-Core API";
                
    $message "[DarkRealms]" $message2;
         
    $this->getLogger()->info($message);
    }


    }
    My plugin.yml
    Code:
    Name: test
    Main: /test/test.php
    Aurthor: HyperFuse
    Version: 1.0
    API: 1.12.0
    Description: This is the Core API for DarkRealmsPE
    
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Change the plugin yml to:
    Code:
    name: test
    main: test\test
    version: 1.0.0
    api: 1.0.0
    author: HyperFuse
    description: This is the Core API for DarkRealmsPE
    commands:
    PEMapModder likes this.
  3. HyperFuse
    Offline

    HyperFuse Banned

    Joined:
    Jun 22, 2015
    Posts:
    7
    Minecraft User:
    HyperFuse
    Hmmm... Fixed the error but showed a new error this one is a T error and gave me a crash log http://hastebin.com/yijurovuni.hs
  4. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Try to add onDisable()
  5. HyperFuse
    Offline

    HyperFuse Banned

    Joined:
    Jun 22, 2015
    Posts:
    7
    Minecraft User:
    HyperFuse
    Same error
  6. HyperFuse
    Offline

    HyperFuse Banned

    Joined:
    Jun 22, 2015
    Posts:
    7
    Minecraft User:
    HyperFuse
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Why hastebin links .vbs and .coffee?

    You don't need to.
    What error dump? Please post the script WITH your crash dump. All those scripts and dumps are confusing.
  8. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    You forgot to end the plugin with another "}" at the end of the plugin...
    Primus likes this.
  9. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Did you closed your class?
  10. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Well, I thought that too but in the code he posted here it's there.
  11. Anton Magsino
    Offline

    Anton Magsino Active Member

    Joined:
    Jan 17, 2014
    Posts:
    58
    Minecraft User:
    MinecrafterPH
    Maybe you need to end it with
    PHP:
    ?>
  12. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    No, you don't need to do that.
    PEMapModder likes this.
  13. HyperFuse
    Offline

    HyperFuse Banned

    Joined:
    Jun 22, 2015
    Posts:
    7
    Minecraft User:
    HyperFuse
    Also im not using an IDE as im not on a computer. I don't currently have acces to one either
  14. HyperFuse
    Offline

    HyperFuse Banned

    Joined:
    Jun 22, 2015
    Posts:
    7
    Minecraft User:
    HyperFuse
    Ive tried
    Code:
    <?php
    
            namespace hf\myplugin\myplugin; 
    
            use pocketmine\plugin\PluginBase; 
    
            class MyPlugin extends PluginBase { 
    }
    ?>
    
Thread Status:
Not open for further replies.

Share This Page

Advertisement