Hi I'm French and i have doing a Plugin But when i launch PocketMine with My Plugin(with DevTools) I have all the time an error. Please can you help me This is my Plugin it is easy because i start in the création of plugins and is it so difficulte and i can't see vidéo with this title because i'm french turn to the problem <?php /* @Name Advert @main Palente\Advert\Class @version 1.0.0 @api 1.13.1 @author Palente */ namespace Palente\Advert ; use PocketMine\Plugin\PluginBase ; class Advert\PluginBase { public function onEnable () { $this->getLogger()->info ("onEnable () has been called!") ; } $this->getLogger()->info ("onDisable () has been called!") ; } } And this is the error in Pocket Mine [PocketMine] Server is starting... [PocketMine] Server was started. [Server] [02:52:06] [Server thread/WARNING]: Timezone could not be automatically determined. An incorrect timezone will result in incorrect timestamps on console logs. It has been set to "UTC" by default. You can change it on the php.ini file. [Server] [02:52:06] [Server thread/INFO]: Loading pocketmine.yml... [Server] [02:52:06] [Server thread/INFO]: Loading server properties... [Server] [02:52:06] [Server thread/INFO]: Enable MainLogger to file [Server] [02:52:06] [Server thread/INFO]: Selected English (eng) as the base language [Server] [02:52:06] [Server thread/INFO]: Starting Minecraft: PE server version v0.14.x beta/alpha [Server] [02:52:09] [Server thread/INFO]: Enabling DevTools v1.10.0 [Server] [02:52:09] [Server thread/INFO]: Loading source plugin Advert v1.0.0 [Server] [Server] Fatal error: Namespace declaration statement has to be the very first statement in the script in /storage/emulated/0/PocketMine/plugins/Advert/src/Advert/Advert.php on line 10
I do that This is my plugin.yml is a easy i start in code name: Advert main: Advert\Advert version: 1.0.0 api: 1.12.1 namespace: Palente\Advert ; use: PocketMine\Plugin\PluginBase ; class: Advert\PluginBase { public function onEnable () { $this->getLogger()->info ("onEnable () has been called!") ; } $this->getLogger()->info ("onDisable () has been called!") ; } } Error: [Server] [03:19:27] [Server thread/INFO]: Enabling DevTools v1.10.0 [Server] [03:19:27] [Server thread/ERROR]: Could not load '/storage/emulated/0/PocketMine/plugins/Advert' in folder '/storage/emulated/0/PocketMine/plugins/': yaml_parse(): scanning error encountered during parsing: could not find expected ':' (line 10, column 1), context while scanning a simple key (line 9, column 1) [Server] [03:19:27] [Server thread/WARNING]: RuntimeException: "yaml_parse(): scanning error encountered during parsing: could not find expected ':' (line 10, column 1), context while scanning a simple key (line 9, column 1)" (E_WARNING) in "/src/pocketmine/plugin/PluginDescription" at line 2 What I can do please
What is this? Code: namespace: Palente\Advert; use: PocketMine\Plugin\PluginBase; class: Advert\PluginBase
He created snippet plugin where you have to show plugin.yml info above PHP: /** * @name Plugin * @author * @... */
Oh right, I thought he was following how old .php plugins were made. Either way, this is poorly written.