Comments in 'Plugin Development' started by Flabe, Jan 21, 2016.

1. Offline

### FlabeActive Member

Joined:
Nov 17, 2015
Posts:
147
Minecraft User:
Hello guys i tried to use this code but it crashes , is there any mistakes?? Can anyone correct me please?
PHP:
4. Offline

### FlabeActive Member

Joined:
Nov 17, 2015
Posts:
147
Minecraft User:
Here you are)))
5. Offline

### PocketKillerNotable Member

Joined:
Jul 20, 2015
Posts:
741
many useless imports,
replace
PHP:
 use pocketmine\entity\Item; //touse pocketmine\item\Item; 
PEMapModder and applqpak like this.
6. Offline

### FlabeActive Member

Joined:
Nov 17, 2015
Posts:
147
Minecraft User:
because its edited code all the imports are used in original code
7. Offline

### FlabeActive Member

Joined:
Nov 17, 2015
Posts:
147
Minecraft User:
PHP:
 2016-01-21 [21:59:32] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerInteractEvent' to 'PixelTryPlugin v0.2': Argument 1 passed to pocketmine\utils\BinaryStream::putSlot() must be an instance of pocketmine\item\Item, null given, called in phar:///home/servs/srv3000/PocketMine-MP.phar/src/pocketmine/network/protocol/AddItemEntityPacket.php on line 43 and defined on Oleg\PixelTryPlugin"2016-01-21 [21:59:32] [Server thread/NOTICE]: InvalidArgumentException: "Argument 1 passed to pocketmine\utils\BinaryStream::putSlot() must be an instance of pocketmine\item\Item, null given, called in phar:///home/servs/srv3000/PocketMine-MP.phar/src/pocketmine/network/protocol/AddItemEntityPacket.php on line 43 and defined" (E_RECOVERABLE_ERROR) in "/src/pocketmine/utils/BinaryStream" at line 219 
8. Offline

Joined:
Jul 20, 2015
Posts:
741
not all.
9. Offline

### FlabeActive Member

Joined:
Nov 17, 2015
Posts:
147
Minecraft User:
its the code i am using just don't care
do you know why is the error?
10. Offline

### XFuryMCPEActive MemberPlugin Developer

Joined:
Jun 19, 2015
Posts:
137
Plugins:
2
Minecraft User:
You can't expect to make a working plugin if you don't know PHP. codecademy.com can teach you php, then learn the PM API, copying code from other plugins isn't the answer.
applqpak and PocketKiller like this.
11. Offline

### Vaivez66Notable MemberPlugin Developer

Joined:
Jun 10, 2015
Posts:
402
Plugins:
2
Ugh... You don't care with your code? xD
applqpak and PocketKiller like this.
12. Offline

### FlabeActive Member

Joined:
Nov 17, 2015
Posts:
147
Minecraft User:
i learnt all lessons on codecademy i know php and oop i just trying to make some code and i don't know where to learn PM API i looked in other people plugins and on pocketmine's github and this code is just from pocket mine and other added is mine if you can help just do it. If you can't stop saying Learn php
13. Offline

### FlabeActive Member

Joined:
Nov 17, 2015
Posts:
147
Minecraft User:
i said i am using code that i posted now.
14. Offline

### xBeastModeActive Member

Joined:
Nov 27, 2015
Posts:
292
applqpak likes this.
15. Offline

### XFuryMCPEActive MemberPlugin Developer

Joined:
Jun 19, 2015
Posts:
137
Plugins:
2
Minecraft User:
I honestly don't believe you. How can you PHP if you can't grammar?
Hotshot_9930 likes this.
16. Offline

### Vaivez66Notable MemberPlugin Developer

Joined:
Jun 10, 2015
Posts:
402
Plugins:
2
Lol, I can't grammar, but I can PHP -_-
PocketKiller and XFuryMCPE like this.
17. Offline

### XFuryMCPEActive MemberPlugin Developer

Joined:
Jun 19, 2015
Posts:
137
Plugins:
2
Minecraft User:
*claps* xD
PocketKiller likes this.
18. Offline

### Legoboy0215Notable Member

Joined:
Nov 1, 2014
Posts:
1,724
Minecraft User:
See, this is example of sams. Not the thread starters fault. I am going to reply, just wait.
19. Offline

### FlabeActive Member

Joined:
Nov 17, 2015
Posts:
147
Minecraft User:
ok, thanks)
20. Offline

### PEMapModderNotable MemberPlugin Developer

Joined:
Oct 9, 2013
Posts:
7,294
Plugins:
11
Minecraft User:
As a matter of fact, if you try to but cannot understand English grammar, one of the most systematic languages in the word, it is hard to believe that you can understand programming syntax.
jojoe77777 likes this.