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

Transfering

Discussion in 'Facepalm' started by Daniel23, Jun 24, 2017.

  1. Daniel23

    Daniel23 Witch

    Messages:
    65
    GitHub:
    daniel23
    Having problem with line 28.
    It's the transfering server thing

    PHP:
    <?php
    namespace gamer\trasnfering;

    use 
    pocketmine\plugin\PluginBase;

    use 
    pocketmine\event\player\PlayerTransferEvent;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\command\deafults\TransferServerCommand;
    use 
    pocketmine\player;
    use 
    pocketmine\server;
    use 
    pocketmine\utils\TextFormat as clr;

    class 
    Main extends PluginBase {
        
        public function 
    onEnable() {
            
    $this->getLogger()->info(clr::GREEN "Transfering Enabled");
            }
            
            public function 
    onCommand(CommandSender $senderCommand $command$label, array $args) {
                switch (
    $command->getName() ) {
                    case 
    "Practice":
                    
                             
    $sender->transfer("pvplegend.us.moo",19132"Transferring to PvP server!");
                
                           break;
            
        public function 
    onDisable() {
            
    $this->getLogger()->info(clr::RED "Transfering Disabled");
            }
    }
     
  2. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    You have an PhP Syntax error... Can you deal with PhP? The brackets are set completely wrong
     
    BEcraft likes this.
  3. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Facepalm section. This is not a PocketMine issue, nor does it have to do with the API. This is a syntax error. Look it up yourself and learn how to use brackets.
     
  4. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    PHP:
    <?php

    namespace gamer\trasnfering;

    use 
    pocketmine\plugin\PluginBase;

    use 
    pocketmine\event\player\PlayerTransferEvent;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\command\deafults\TransferServerCommand;
    use 
    pocketmine\player;
    use 
    pocketmine\server;
    use 
    pocketmine\utils\TextFormat as clr;

    class 
    Main extends PluginBase {
        
        public function 
    onEnable() {
            
    $this->getLogger()->info(clr::GREEN "Transfering Enabled");
        }
        
        public function 
    onCommand(CommandSender $senderCommand $command$label, array $args) {
            switch(
    $command->getName()) {
                    case 
    "Practice":
                    
                    
    $sender->transfer("pvplegend.us.moo",19132"Transferring to PvP server!");
                    return;
                    break;
            }
        }
        
        public function 
    onDisable() {
            
    $this->getLogger()->info(clr::RED "Transfering Disabled");
        }
    }
     
  5. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    learn php but i love helping so here you go ^*^ , pretty please learn PHP First and use an IDE to find syntax error etc
     
    jasonwynn10 likes this.
  6. Daniel23

    Daniel23 Witch

    Messages:
    65
    GitHub:
    daniel23
    Thank you very much to you kind man
     
  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.