I have a syntax error with my plugin. I ask for help because I can not solve it https://pastebin.com/Wq7zmRxi Already Thank
Hey. Could you please show me the console error messages? (If I had my laptop, I could solve it, but right now I’m using my phone.)
Please keep in mind that this section is for PMMP API related not PHP related question, also dont "just say "can you give me code" without making any effort to solve your own problem first." if you are having issues with syntax errors i highly recommend you to use an IDE to assist you, or these PHP checker websites but i recommend not to since sometimes it can get very unhelpful if you wish to post this kind of questions you are recommended to post it in facepalm section... to get more appropriate respond
[QUOTE = "Thunder33345, poste: 27911, membre: 15"] N'oubliez pas que cette section concerne l'API PMMP non traitée par PHP, Aussi ne "disent simplement" pouvez-vous me donner un code "sans faire aucun effort pour résoudre votre propre problème d'abord." Si vous rencontrez des problèmes avec des erreurs de syntaxe, je vous recommande vivement d'utiliser un IDE pour vous aider, ou ces sites Web de vérificateurs PHP, mais je vous le recommande, car parfois il peut être très peu utile Si vous souhaitez publier ce genre de questions, vous êtes recommandé de l'afficher dans la section facepalm ... pour obtenir une réponse plus appropriée [/ QUOTE] I have already passed this stage. I used php code checker pulse
[QUOTE = "TheDeibo, poste: 27910, membre: 11"] Hé. Pourriez-vous me montrer les messages d'erreur de la console? (Si j'avais mon ordinateur portable, je pourrais le résoudre, mais maintenant j'utilise mon téléphone.) [/ QUOTE] Merci quand même
Hi. This forum is a English Forum. Try keep it that way . I believe your issue is the PHP: public function onInteract(PlayerInteractEvent $event){$player = $event->getPlayer();$item = $event->getItem();//Inventoryif($item->getCustomName() == "inventory"){$player->getInventory()->clearAll();$player->getInventory()->setItem(Item::get(329)->setCustomName("gadgets"));}//Gadgetsif($item->getCustomName() == "gadgets"){$player->getInventory()->clearAll();$player->getInventory()->setItem(Item::get(280)->setCustomName("tntthrower"));if($item->getCustomName() == "tntthrower"){$nbt = new CompoundTag( "", [ "Pos" => new ListTag( "Pos", [ new DoubleTag("", $player->x), new DoubleTag("", $player->y+$player->getEyeHeight()), new DoubleTag("", $player->z) ]), "Motion" => new ListTag("Motion", [ new DoubleTag("", -\sin ($player->yaw / 180 * M_PI) *\cos ($player->pitch / 180 * M_PI)), new DoubleTag ("", -\sin ($player->pitch / 180 * M_PI)), new DoubleTag("",\cos ($player->yaw / 180 * M_PI) *\cos ( $player->pitch / 180 * M_PI)) ] ), "Rotation" => new ListTag("Rotation", [ new FloatTag("", $player->yaw), new FloatTag("", $player->pitch) ] ) ] ); $f = 3.0; $snowball = Entity::createEntity("PrimedTNT", $player->getlevel(), $nbt, $player); $snowball->setMotion($snowball->getMotion()->multiply($f)); $snowball->spawnToAll();} Please make sure the syntax, and all ending of any if statements are correct. If you use a IDE (or a text editor that supports PHP) it will tell you where you went wrong. It will also highlight corresponding brackets.