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

Error

Discussion in 'Facepalm' started by Jonas, Mar 28, 2017.

  1. Jonas

    Jonas Baby Zombie

    Messages:
    192
    My Server say when i my Plugin Load that there a unexpected “;“ is , but there is only 1 ;
    Here is the Line in there the error is
    PHP:
    $helmet Item::get(306);
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    we cant help you if you dont upload the full file with that kind of errors
     
  3. Jonas

    Jonas Baby Zombie

    Messages:
    192
    Ok here is the Crashdump.
     

    Attached Files:

  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    you would probably need your CODE
    we cant fix a syntax error via crashdump
     
  5. Jonas

    Jonas Baby Zombie

    Messages:
    192
    The complete Code has 300 Lines all or how much?
     
  6. Jonas

    Jonas Baby Zombie

    Messages:
    192
    Here is the Code. In the last Line say RCON there is a unexpecpted “;“
    PHP:
    <?php

    namespace Main;

    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\utils\TextFormat as C;
    use 
    pocketmine\item\Item;
    use 
    pocketmine\block\Block;
    use 
    pocketmine\Player;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\event\player\PlayerJoinEvent;
    use 
    pocketmine\event\player\PlayerQuitEvent;
    use 
    pocketmine\event\player\PlayerRespawnEvent;
    use 
    pocketmine\event\player\PlayerDeathEvent;
    use 
    pocketmine\entity\Entity;
    use 
    pocketmine\entity\Effect;
    use 
    pocketmine\event\block\BlockBreakEvent;
    use 
    pocketmine\event\block\BlockPlaceEvent;
    use 
    pocketmine\level\Level;
    use 
    pocketmine\math\Vector3;
    use 
    pocketmine\item\enchantment\Enchantment;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\Server;
    use 
    pocketmine\event\entity\EntityDamageEvent;
    use 
    pocketmine\event\entity\EntityDamageByEntityEvent;
    use 
    pocketmine\utils\Config;
    use 
    pocketmine\event\player\PlayerInteractEvent;

    class 
    SoupFFA extends PluginBase implements Listener {
        
        public 
    $prefix C::AQUA"Soup"C::RED "FFA" C::GRAY " | ";
        
        public function 
    onEnable() {
                @
    mkdir($this->getDataFolder());
                
    $cfg = new Config($this->getDataFolder(). "config.yml"Config::YAML);
                if(empty(
    $cfg->get("SpawnSchutz"))) {
                    
    $cfg->set("SpawnSchutz"5);
                }
                
    $cfg->save();
            
                
    $this->getServer()->getPluginManager()->registerEvents($this$this);
                
    $this->getLogger()->info($this->prefix C::GREEN " wurde Aktiviert!");
                
    $this->getLogger()->info($this->prefix " Plugin von " C::GOLD . ("Von Jonas");
        }
        
        public function 
    onJoin(PlayerJoinEvent $event) {
            
    $player $event->getPlayer();
            
    $name $player->getName();
            
    $player->getInventory()->clearAll();
            
    $event->setJoinMessage($this->prefixC::RED$nameC::GOLD" hat das Spiel betreten");
            
    $player->teleport($this->getServer()->getDefaultLevel()->getSafeSpawn());
            
    $player->setGamemode(0);
            
    $player->setFood(20);
            
    $player->setHealth(20);
            if(
    $player->hasPermisson("FFA.ITEMS.VIP"){
               
    $helm Item::get(306);
     
  7. Intyre

    Intyre Administrator Staff Member PMMP Team

    Messages:
    81
    GitHub:
    Intyre
    Tip: check all lines before the line with the error!
     
  8. Jonas

    Jonas Baby Zombie

    Messages:
    192
    I think its in the line before the error, bug i have no idea where the error is
     
  9. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    You are missing a ) in the if statement above the last line.
     
  10. Jonas

    Jonas Baby Zombie

    Messages:
    192
    Ok thanks
    :facepalm:
     
  11. [deleted]

    [deleted] Guest



    btw: Its mean FreeFightAll so why do you add VIP Kits?
     
  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.