This is the Problem: [10:09:53] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected ')', expecting '{'" (EXCEPTION) in "plugins/teleporter/src/fixed/Main" at line 16 And this is 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"); } }
PHP: public function openHelpUI(Player $player,string $unknown){$form = new SimpleForm(function(Player $player, int $data = null) {});$form->addbutton("§3Citybuild");$player->sendForm($form);}
Thanks for Help, but there ist a new Problem: [20:12:02] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected ' ' (T_STRING), expecting '{'" (EXCEPTION) in "plugins/teleporter/src/fixed/Main" at line 16 [20:12:02] [Server thread/DEBUG]: #0 ():