Ok so im new to coding and tbh i don't know exactly what im doing but i can make i am atleast able to make a plugin. Anyways i made a test plugin because I wanted to make a kit plugin and when i load the plugin into the pocketmine app is says this ( [02:57:04] [Server thread/INFO]: Loading kit v1 [02:57:04] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected 'use' (T_USE), expecting '{'" (EXCEPTION) in "plugins/Kits/src/PandaDev/kit/Main" at line 5) so i need help how to fix this
Also here is the code in the main.php <?php namespace PandaDev\kit use pocketmine\Server use pocketmine\plugin\PluginBase; use pocketmine\command\CommandSender; use pocketmine\{Player, Server}; use pocketmine\command\command; use jojoe77777\FormAPI; class Main extends PluginBase{ public function onEnable(){ $this->getLogger()->info("Enabled!") } public function onCommand(CommandSender $o, Command $kmt, string $label, array $args): bool{ if($kmt->getName() == "kit"){ $this->videoForm($o); } return true; } public function videoForm(player $o){ $f = $this->getServer()getPluginManager()->getPlugin("FormAPI")->createSimpleForm(function (Player $o, aray $data){ $re = $data[0]; if($re === null){ return true; } switch($re){ case 0: $o->sendMessage("idk"); break; } }); $f->setTitle("kits"); $f->setContent("choose a kit"); $f->addButton("kit 1"); $f->sendToPlayer($o); } } ?>
You are missing a ; after "use pocketmine\Server". Oh, and you are missing a ; too in the line where you print "Enabled" to the console
Thank you but it says this in the console [17:26:41] [Server thread/INFO]: Loading kit v1 [17:26:41] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected '}'" (EXCEPTION) in "plugins/Kits/src/PandaDev/kit/Main" at line 16
Please use php tag in the forum. Your error is there: PHP: public function onEnable(){$this->getLogger()->info("Enabled!") //HERE} You forgot to put the ; at the end of the line as also @TobiasDev said. Please learn php and error debugging .-.