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

Someone To Help Fix Error

Comments in 'Plugin Development' started by MichaelM04, Dec 13, 2015.

  1. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    I'm trying to get this plugin working its HungerGames
    There's a error that I don't know how to fix could someone help?
    Here the repo https://github.com/MinecrafterPH/HungerGames
    And here's the error in the file

      • Inspection result: Warning
      • Warnings
        • Server::getInstance() scanned in filesrc/HG/Main.php
          • The PHP extensions that PocketMine-MP uses have some issues with static properties. You are recommended try using other methods to get the Serverinstance.
          • You can use $this->getServer() to get the server object instead.
        • PluginBase::$config is already defined in PocketMine PluginBase class. Strange errors will occur if you override $this->config yourself. For example, when you decide to use$this->saveDefaultConfig() later, it will not work.
          • You are recommended to improve this by renaming $this->config to something else, or to use $this->saveDefaultConfig() and related functions.
    • Syntax errors
      • Inspection result: Error
      • Errors
        • PHP Parse error: syntax error, unexpected 'has' (T_STRING) in /var/www/tmp/5/HungerGames/src/HG/Main.php on line 208
          Errors parsing /var/www/tmp/5/HungerGames/src/HG/Main.php
      • Info
  2. wolfdale
    Offline

    wolfdale Active Member Plugin Developer

    Joined:
    Dec 3, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    ace
    Change
    PHP:
    $sender->sendMessage(TextFormat::RED.".$player." has ".$deaths." deaths and ".$kills." kills.");
    to
    PHP:
    $sender->sendMessage(TextFormat::RED.$player." has ".$deaths." deaths and ".$kills." kills.");
  3. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    Okay that's fixed but now I get this error :(

    • Inspection result: Error
    • Errors
      • PHP Parse error: syntax error, unexpected 'break' (T_BREAK) in /var/www/tmp/5/HungerGames/src/HG/Main.php on line 623
        Errors parsing /var/www/tmp/5/HungerGames/src/HG/Main.php
    • Info
  4. wolfdale
    Offline

    wolfdale Active Member Plugin Developer

    Joined:
    Dec 3, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    ace
    You forgot semi-colon on line 622
  5. minebuilder0110
    Offline

    minebuilder0110 Notable Member

    Joined:
    Dec 8, 2014
    Posts:
    485
    Minecraft User:
    Apparitional
    Why not study PHP yourself?
    applqpak and PEMapModder like this.
  6. TryoneLegendZzz
    Offline

    TryoneLegendZzz Active Member

    Joined:
    May 31, 2015
    Posts:
    201
    Minecraft User:
    SavionLegendZzz
    this "WAS" a plugin i was working on as you can see it is a fork i quit developing it publicly and made it neater and better :)
  7. DC4CODE
    Offline

    DC4CODE Active Member

    Joined:
    Nov 19, 2015
    Posts:
    64
    Minecraft User:
    dxdsc9349
    Cool cool
  8. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    Okay so I fixed tons of other errors I pretty much figured it out but I get this when I load in server
    ARNING]: A plugin attempted to register a deprecated CallbackTask (Callback#HG\Main::gameTimber)
    [13:12:56] [NOTICE]: InvalidArgumentException: "Argument 1 passed to pocketmine\scheduler\CallbackTask::__construct() must be callable, array given, called in phar:///home/tcagame_svc1232/AJM/1232/plugins/hunger games.phar/src/HG/Main.php on line 55 and defined" (E_RECOVERABLE_ERROR) in "/src/pocketmine/scheduler/CallbackTask" at line 45
    [13:12:56] [INFO]: Disabling HungerGames v1.2
    And also I get error on line 142 when it points ->$pm to economy and pocketmoney plugin says there's a error on line 142 I'm to tired to do this right now hopefully someone figures it out while I'm gone
    Last edited: Dec 13, 2015

Share This Page

Advertisement