Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help plz...

Comments in 'Plugin Development' started by VoBIs, Apr 16, 2016.

Thread Status:
Not open for further replies.
  1. HotFireyDeath
    Offline

    HotFireyDeath Notable Member Plugin Developer

    Joined:
    Mar 19, 2015
    Posts:
    328
    Plugins:
    1
    Minecraft User:
    HotFireyDeath
    Few PHP developers are so perfect that they would never get a PHP error in their entire career.
    ImagicalGamer and applqpak like this.
  2. Hittmana
    Offline

    Hittmana Active Member

    Joined:
    Jul 26, 2015
    Posts:
    224
    Minecraft User:
    move_it
    I haven't had a long career, and I have NetBeans, which catches most errors that I don't.
  3. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Well then, technically you ARE making errors, just your IDE is fixing them.
    Primus and ImagicalGamer like this.
  4. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    That would be really hard.
    HotFireyDeath likes this.
  5. Jankirby
    Offline

    Jankirby Active Member

    Joined:
    Apr 20, 2014
    Posts:
    38
    Minecraft User:
    Natsu_Dragneel
    I'm one of them right now, but not like his attitude. :3
    ImagicalGamer and applqpak like this.
  6. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    Althpugh this conversation is long gone, I will bring up this image as a reference to Data Types. (Not centred to one programming language,)
    [​IMG]
    applqpak likes this.
  7. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Great, although what they're referring to as a "2D Array" I call "Multi-Dimensional Array" :p
    ImagicalGamer likes this.
  8. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Honestly, that won't happen ever. People make mistakes and that's good, there is no way someone doesn't do some.
    I prefer calling it "multi-dimensional array" as well, and I think that's what most people do. Each to their own. :)
    HotFireyDeath and applqpak like this.
  9. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Using PHPStorm :D
  10. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    PHPStorm doesn't change the amount of errors you do. Then, NetBeans would do the same.
    applqpak likes this.
  11. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    Guys, what I do is:
    Use Brackets.io for the text editor part, ( thats my preference of Text Editor )
    then phpformatter.com for the php errors. - Fix all necessary errors

    THEN, test it out using DevTools in the server. Fix all necessary problems errors

    COMPRESTO! Full working plugin
    ImagicalGamer and applqpak like this.
  12. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    Or just use a simple android IDE (DroidEdit), and test it? PocketMine's error logs are good, so I prefer them, specially when you dont have such fast internet to load webpages instantly. Am I the only person, who codes on phone? :D
    applqpak likes this.
  13. AvivShopenCraft
    Offline

    AvivShopenCraft New Member

    Joined:
    Oct 14, 2015
    Posts:
    73
    Minecraft User:
    AvivShopen
    instanceof PPGroup:
    Code:
    $this->getServer()->getPluginManager()->getPlugin("PurePerms")->getGroup("Your group name");
    i guess you just did
    Code:
    $this->getServer()->getPluginManager()->getPlugin("PurePerms")->setGroup(Player $player, $groupName); // you suppose to add a instance of PPgroup not just a group name:)
    like that:
    $this->getServer()->getPluginManager()->getPlugin("PurePerms")->setGroup(Player $player, PPGroup $this->getServer()->getPluginManager()->getPlugin("PurePerms")->getGroup($groupName));
    and btw i was a noob too like few monthes ago:)
    ImagicalGamer and MyNameIsTriXz like this.
  14. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    First replace a few things / addsigns in another /already codet plugins only for your own needs and if youmadd more and more you lern it a bit more and more the wbsites are boring because you can test the plugin directly than if you think im good than you can try your own plugin
  15. VoBIs
    Offline

    VoBIs New Member

    Joined:
    Jun 20, 2015
    Posts:
    18
    Minecraft User:
    VoBIs
    Thanks a lot! But WTF!?


    Genisys Crash Dump Fri Apr 22 12:05:13 MSK 2016

    Error: syntax error, unexpected '$player' (T_VARIABLE), expecting ',' or ')'
    File: /MoneyFromFlower/src/FIRERO/MoneyFromFlower
    Line: 41
    Type: notice

    THIS CRASH WAS CAUSED BY A PLUGIN
    此次出错由插件引起

    Code:
    [32] public function onPlayerInteractEvent(PlayerInteractEvent $event){
    [33] $player = $event->getPlayer();
    [34] $groupName = $this->plugin->getUserDataMgr()->getGroup("Admin");
    [35] $levelName = "spawn";
    [36] $name = $player->getName();
    [37] $money = $this->Economy->mymoney($name);
    [38] if($event->getItem()->getID() == 175){
    [39] if($event->getItem()->getDamage() == 0){
    [40] if($money = 15500){
    [41] $this->getServer()->getPluginManager()->getPlugin("PurePerms")->setGroup(Player $player, PPGroup $this->getServer()->getPluginManager()->getPlugin("PurePerms")->getGroup("Admin"));
    [42] $player->sendMessage("ӻ 孨�);
    [43] }
    [44] }
    [45] }
    [46] }
    [47] }
    [48]
    [49]
    [50]
    [51]
  16. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Learn to read errors, please.

    And while you're at it, please learn PHP. :(
    ImagicalGamer likes this.
  17. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Just saying from my own experience, because I've never got any error with it.
    applqpak and ImagicalGamer like this.
  18. ImagicalGamer
    Offline

    ImagicalGamer Active Member

    Joined:
    Feb 25, 2016
    Posts:
    141
    Minecraft User:
    ImagicalGamer
    http://lmgtfy.com/?q=What is a syntax error?
  19. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Can I ask to not provide anymore help for him? He is not using PocketMine

    Seriously, using 3 different tools to do one thing? Have you seen any of @shoghicp streams? Press run and PocketMine runs.
    Last edited: Apr 22, 2016
Thread Status:
Not open for further replies.

Share This Page

Advertisement