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

Solved Task Error... Again !

Comments in 'Plugin Development' started by PlayCubePE, Nov 1, 2015.

  1. PlayCubePE
    Offline

    PlayCubePE New Member

    Joined:
    Mar 19, 2015
    Posts:
    29
    Minecraft User:
    PlayCubePE
    Here's my onEnable() :

    PHP:
    public function onEnable() {
            
    $this->getServer()->getPluginManager()->registerEvents($this$this);
    $this->getServer()->getScheduler()->scheduleRepeatingTask(new GameTimerTwo($this), 600);

    And here is the error :

    Code:
    [PocketMine] Server is starting...
    [PocketMine] Server was started.
    [Server] [16:48:34] [Server thread/INFO]: Loading pocketmine.yml...
    [Server] [16:48:34] [Server thread/INFO]: Loading server properties...
    [Server] [16:48:34] [Server thread/INFO]: Selected English (eng) as the base language
    [Server] [16:48:34] [Server thread/INFO]: Starting Minecraft: PE server version v0.12.1 alpha
    [Server] [16:48:34] [Server thread/INFO]: Opening server on 0.0.0.0:19132
    [Server] [16:48:34] [Server thread/INFO]: This server is running PocketMine-MP version 1.6dev-48 "[REDACTED]" (API 1.13.0)
    [Server] [16:48:34] [Server thread/INFO]: PocketMine-MP is distributed under the LGPL License
    [Server] [16:48:36] [Server thread/INFO]: Loading MCG76_WorldEdit v0.5.2
    [Server] [16:48:37] [Server thread/INFO]: Loading DevTools v1.10.0
    [Server] [16:48:37] [Server thread/INFO]: Enabling DevTools v1.10.0
    [Server] [16:48:37] [Server thread/INFO]: Loading source plugin Do_Or_Die v1
    [Server] [16:48:37] [Server thread/INFO]: [DevTools] Registered folder plugin loader
    [Server] [16:48:38] [Server thread/INFO]: Preparing level "beta_dod"
    [Server] [16:48:38] [Server thread/INFO]: Enabling MCG76_WorldEdit v0.5.2
    [Server] [16:48:38] [Server thread/INFO]: [MCG76_WorldEdit] -MCG76 WorldEdit Enabled
    [Server] [16:48:38] [Server thread/INFO]: Enabling Do_Or_Die v1
    [Server]
    [Server] Fatal error: Call to undefined function NexoCube\DoD\new GameTimerTwo() in /storage/sdcard0/PocketMine/plugins/Do or Die/src/NexoCube/DoD/Main.php on line 41
    [Server] [16:48:38] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
    [Server] [16:48:38] [Server thread/EMERGENCY]: Please upload the "/storage/sdcard0/PocketMine/CrashDump_Sun_Nov_1-16.48.38-CET_2015.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
    [Server] [16:48:40] [Server thread/INFO]: Disabling MCG76_WorldEdit v0.5.2
    [Server] [16:48:40] [Server thread/INFO]: [MCG76_WorldEdit] - MCG76 WorldEdit Disable
    [Server] [16:48:40] [Server thread/INFO]: Disabling DevTools v1.10.0
    [Server] [16:48:40] [Server thread/INFO]: Disabling Do_Or_Die v1
    [Server] [16:48:40] [Server thread/INFO]: Unloading level "beta_dod"
    And the GameTimerTwo :

    PHP:
    <?php
    namespace NexoCube\DoD;
    use 
    pocketmine\Player;
    use 
    pocketmine\scheduler\PluginTask;
    use 
    pocketmine\Server;
    class 
    GameTimerTwo extends PluginTask{
      
         public function 
    __construct(Main $plugin){          parent::__construct($plugin);
             
    $this->plugin $plugin;
         }
      
    public function 
    onRun($tick){
      
        if(
    $this->gamestarted == true){
          
             
    Server::getInstance()->broadcastMessage("Equipe 1 : ".$this->plugin->teamOneScores."");
             
    Server::getInstance()->broadcastMessage("Equipe 2 : ".$this->plugin->teamTwoScores."");
          
        }
      
        }
        }
    ?>
    Can someone please help me ?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Are you sure the character between "new" and "GameTimerTwo" is a space?
    Legoboy0215 and Gamecrafter like this.
  3. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Whats the name of your main class?
  4. PlayCubePE
    Offline

    PlayCubePE New Member

    Joined:
    Mar 19, 2015
    Posts:
    29
    Minecraft User:
    PlayCubePE
    No, it wasn't a classic space, thx you, you are the PM-Forums Gods
    Taha_The_Hacker likes this.

Share This Page

Advertisement