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

I don't know why this is false

Discussion in 'Plugin Help' started by TheWalkingDrift, Jun 25, 2019.

  1. TheWalkingDrift

    TheWalkingDrift Silverfish

    Messages:
    23
    That is the Problem:

    [05:56:03] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected '{'" (EXCEPTION) in "plugins/teleporter/src/fixed/Main" at line 13

    And thats my Code:

    <?php

    namespace Server;

    use pocketmine\plugin\PluginBase;
    use pocketmine\event\Listener;
    use pocketmine\command\CommandSender;
    use pocketmine\command\Command;
    use pocketmine\Player;
    use pocketmine\plugin\Plugin;
    use jojoe77777\FormAPI\SimpleForm;

    class Main extends Listener{

    public function openHelpUI(){
    $form = new SimpleForm(function(Player $player, int $data = null) {});
    $form->addbutton("ยง3Citybuild");
    }
    public function onCommand(CommandSender $sender, string $commandLabel, array $args) {
    switch ($args[0]) {
    case "tpuicity":
    $this->openHelpUI($sender, "Menu Opened");
    }
    }
    }
     
  2. A354-PH

    A354-PH Baby Zombie

    Messages:
    186
    GitHub:
    Kizu
    Where is line 13?
     
  3. TheWalkingDrift

    TheWalkingDrift Silverfish

    Messages:
    23
    class BuildFFA extends PluginBase implements Listener{
    This is line 13
     
  4. TheWalkingDrift

    TheWalkingDrift Silverfish

    Messages:
    23
    class BuildFFA extends PluginBase implements Listener{
     
  5. Destroyer57

    Destroyer57 Zombie

    Messages:
    275
    remove }
     
  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.