[Server thread/CRITICAL]: ParseError: "syntax error, unexpected '$mapname' (T_VARIABLE), expecting '

Discussion in 'Help' started by Mochi, Apr 29, 2019.

  1. Mochi

    Mochi Spider Jockey

    Messages:
    26
    [10:06:26] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected '$mapname' (T_VARIABLE), expecting ',' or ')'" (EXCEPTION) in "plugins/SW/src/Sf/Sf/Sf" at line 116
    [10:06:26] [Server thread/DEBUG]: #0 (): BaseClassLoader->loadClass(string Sf\Sf\Sf)
    [10:06:26] [Server thread/DEBUG]: #1 (): spl_autoload_call(string Sf\Sf\Sf)
    [10:06:26] [Server thread/DEBUG]: #2 src/pocketmine/plugin/PluginManager(178): class_exists(string Sf\Sf\Sf, boolean 1)
    [10:06:26] [Server thread/DEBUG]: #3 src/pocketmine/plugin/PluginManager(343): pocketmine\plugin\PluginManager->loadPlugin(string /storage/emulated/0/PocketMine-MP/plugins/SW, array Array())
    [10:06:26] [Server thread/DEBUG]: #4 plugins/PocketMine-DevTools_dev-126.phar/src/DevTools/DevTools(71): pocketmine\plugin\PluginManager->loadPlugins(string /storage/emulated/0/PocketMine-MP/plugins/, array Array())
    [10:06:26] [Server thread/DEBUG]: #5 src/pocketmine/plugin/PluginBase(123): DevTools\DevTools->onEnable()
    [10:06:26] [Server thread/DEBUG]: #6 src/pocketmine/plugin/PluginManager(587): pocketmine\plugin\PluginBase->setEnabled(boolean 1)
    [10:06:26] [Server thread/DEBUG]: #7 src/pocketmine/Server(1993): pocketmine\plugin\PluginManager->enablePlugin(DevTools\DevTools object)
    [10:06:26] [Server thread/DEBUG]: #8 src/pocketmine/Server(1979): pocketmine\Server->enablePlugin(DevTools\DevTools object)
    [10:06:26] [Server thread/DEBUG]: #9 src/pocketmine/Server(1712): pocketmine\Server->enablePlugins(integer 0)
    [10:06:26] [Server thread/DEBUG]: #10 src/pocketmine/PocketMine(258): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /storage/emulated/0/PocketMine-MP/, string /storage/emulated/0/PocketMine-MP/plugins/)
    [10:06:26] [Server thread/DEBUG]: #11 (1): require(string phar:///storage/emulated/0/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/PocketMine.php)


    PHP:
    public function sendTopKill($player$mapname){
            
    arsort($this->kills[$mapname]);
          
            
    $names array_keys($this->kills[$mapname]);
            
    $kills array_values($this->kills[$mapname]);
            
    $player->sendMessage("§l§a» §r§eTop kills :");
            for(
    $i 0$i 3$i++){
                
    $place $i+1;
                
    $player->sendMessage("§a#".$place." §e".$names[$i]. " - ".$kills[$i]." kill(s)");
            }
        }
     
  2. HeyDeniis_

    HeyDeniis_ Silverfish

    Messages:
    21
    PHP:

    public function sendTopKill($p,$map){
    if(isset(
    $this->kills[$map])){
    $p->sendMessage("§aTop Kills:");
    $i 1;
    foreach(
    $this->kills[$map] as $name => $kills) {
    if(
    $i 3){
    $p->sendMessage("§a#§c$i §ePlayer§b $name §ekills§b $kills");
    $i++;
    }
    }
    }
     

Share This Page

  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.