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

Base Loader

Discussion in 'Development' started by RinkuPlugins, Nov 4, 2017.

  1. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    I'm appalled by your stupidity. You have two Main classes, but the one that you're using to enable the plugin has the namespace above <?php which means it'll throw an error. Remove that and you'll be fine.

    PHP:
    namespace Mega\pl;
    <?php
    namespace Mega\pl;

    use 
    pocketmine\plugin\PluginBase;
    // No need of use path\CommandNameClass; because it's in the same folder

    class MainBase extends PluginBase {

        public function 
    onEnable(){
        
    $this->getServer()->getLogger()->info("Mega System Enabled!");
        
    $this->getServer()->getCommandMap()->register("sysver", new Ver($this));
        }
    }
    Just a friendly suggestion from me, but remove the other Main class since you aren't using it at all.
     
    jasonwynn10 likes this.
  2. RinkuPlugins

    RinkuPlugins Spider Jockey

    Messages:
    26
    GitHub:
    emeraldthedev
    Because it donsnt make changes sometime
     
  3. RinkuPlugins

    RinkuPlugins Spider Jockey

    Messages:
    26
    GitHub:
    emeraldthedev
    Just took this take a look
     

    Attached Files:

  4. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    Is this the same code that you sent via the ZIP file? Because if not, send the code of your MainBase class.
     
  5. RinkuPlugins

    RinkuPlugins Spider Jockey

    Messages:
    26
    GitHub:
    emeraldthedev
  6. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    Are you positive that you've updated it via your plugins folder?

    P.S. I'd study up on PHP more, because as of now you seem clueless on what you're doing.
     
    jasonwynn10 likes this.
  7. RinkuPlugins

    RinkuPlugins Spider Jockey

    Messages:
    26
    GitHub:
    emeraldthedev
    This worked on the old api I made it bro I just made changed
     
  8. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    You didn't answer my question, "bro." If you want help, you're going to have to put effort into this as well. We're not going to just do everything for you.
     
  9. RinkuPlugins

    RinkuPlugins Spider Jockey

    Messages:
    26
    GitHub:
    emeraldthedev
    That' true just do you know the issue so that I can fix
     
  10. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    How can I know the issue if you haven't provided any effort whatsoever.

    Let's go over this again:

    1) Verify that you're using the same code that you sent.

    2) Make sure there's a semi-colon(this thing --> ; ) after your namespace.
     
    NickTehUnicorn and jasonwynn10 like this.
  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.