pocketmine吧 关注:29,707贴子:235,542

【新人求助】插件错误

只看楼主收藏回复

<?php
namespace sethealth;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
use pocketmine\event\player\playerJoinEvent;
use pocketmine\Player;
class dbxs extends PluginBase implements Listener{
public function onEnable(){
$this->getServer()->getPluginManager()->registerEvents($this,$this);
$this->getLogger()->info("启动中");
}
public function onLoad(){
$this->getLogger()->info("加载中");
}
public function onDisable(){
$this->getLogger()->info("卸载中");
}
public function onJoin(playerJoinEvent $event){
$event->getPlayer()->setHealth(40);
}
}
?>


IP属地:湖北1楼2016-07-12 00:12回复
    请问哪里出错了


    IP属地:湖北2楼2016-07-12 00:12
    回复
      错误报告是什么


      来自Android客户端3楼2016-07-12 00:28
      回复
        Server thread/EMERGENCY Please upload the "crashdumps/CrashDump_Mon_Jul_11-12.40.27-CDT_2016.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
        12.07 01:40:27 [Server] Server thread/EMERGENCY An unrecoverable error has occurred and the server has crashed. Creating a crash dump
        12.07 01:40:27 [Server] INFO Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in phar://plugins/233.phar/src/dbxs/dbxs.php on line 2


        IP属地:湖北来自Android客户端4楼2016-07-12 01:44
        回复
          第二行没错啊。。


          IP属地:湖北来自Android客户端5楼2016-07-12 01:44
          回复
            namespace你确定对了?


            IP属地:广东来自Android客户端6楼2016-07-12 07:13
            收起回复
              Server thread/EMERGENCY Please upload the "crashdumps/CrashDump_Mon_Jul_11-21.56.42-CDT_2016.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.12.07 10:56:42 [Server] Server thread/EMERGENCY An unrecoverable error has occurred and the server has crashed. Creating a crash dump12.07 10:56:42 [Server] INFO Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in phar://plugins/233.phar/src/dbxs/dbxs.php on line 2
              可是还是错 @afdhkhcdggcvbb


              IP属地:湖北7楼2016-07-12 10:59
              收起回复


                IP属地:湖北8楼2016-07-12 11:02
                回复
                  换个插件不就行了


                  来自Android客户端9楼2016-07-12 11:39
                  收起回复

                    @afdhkhcdggcvbb
                    是不是这个


                    IP属地:湖北10楼2016-07-12 11:52
                    回复
                      求助啊


                      IP属地:湖北11楼2016-07-12 12:46
                      回复
                        求助啊


                        IP属地:湖北12楼2016-07-12 14:50
                        回复
                          求助啊


                          IP属地:湖北13楼2016-07-12 16:13
                          回复


                            来自Android客户端14楼2016-07-12 16:21
                            回复
                              当前脚本文件的第一个命名空间前面不能有任何代码


                              来自手机贴吧16楼2016-07-12 17:22
                              收起回复