1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Still need help

Discussion in 'Off-Topic' started by Indexfire, Dec 14, 2016.

  1. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    I read ALL of the guides lots and lots of times, spent nights trying to figure out how to code but NONE are helping me understand questions i have:

    What is:
    use\pocketmine\example\example

    What is a Plugin class?

    What is a:
    public function _example {
    }

    And what else do i need to know? The guides dont tell me much and not all the codes are in plugin class or public function format...
     
  2. applqpak

    applqpak Spider Jockey

    Messages:
    27
    GitHub:
    applqpak
    Do you even know PHP...? From this post it seems you don't. Look up on the docs at http://php.net
     
  3. Jack Noordhuis

    Jack Noordhuis Zombie Pigman Poggit Reviewer

    Messages:
    618
    GitHub:
    JackNoordhuis
    This is a forum for PocketMine-MP, not PHP. You will need to learn PHP and OOP (Object Oriented Programming) before you even start to consider creating any plugins.

    My advice to you is that you should start by pulling apart plugins to figure out how they work then start working with commands and events; this is of course after you have some knowledge of PHP.
     
    applqpak likes this.
  4. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    Wait i need to know another program before i can learn this???
     
  5. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    What people are trying to tell you is that plugins are written in PHP - that is the programming language you'll have to learn - and they use the PocketMine API (also PHP) to actually do things in the game. So learning PHP will equip you to code for many different API's including, but not only, PocketMine's.
     
    Indexfire and applqpak like this.
  6. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    Seems like i have a lot to learn, do you recommend any websites where i can learn this?


    Also im still worried that after learning php i still wont know how to code pocketmine (i mean you need knowledge of pocketmine code as well as php, right?)
     
  7. Magicode

    Magicode Baby Zombie

    Messages:
    183
    GitHub:
    magicode1
    CodeAcademy, Php.net, Google, any number of searches on Google will bring you countless places you can learn PHP.
     
  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Moved thread to Off-Topic.

    http://pemapmodder.github.io/PocketMine-Plugin-Tutorials/en/ This plugin tutorial by PEMapModder may be helpful in learning basic PHP knowledge for PocketMine plugins.
    Namespaces and classes are advanced knowledge in PHP, but you don't need to understand them fully to write a plugin.
     
  9. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    You could think of learning PHP as learning a language like English, for example... And knowing how to code PM plugins as knowing the bible well enough to use a phrase like 'he walks on water' to convey more meaning than just the words themselves. Sort of. The bottom line is that learning PHP will equip you for loads of programming fun, and pain... whether you choose to code websites, plugins, games or whatever. Also, the language you choose to learn doesn't really matter much because the principles of program flow, logic, conditionals, loops, OOP etc are common to almost every language.

    As for being 'worried' about it... don't focus on becoming the best coder, just make sure you are having fun learning instead. It's the same with music, for example; being obsessed with becoming the best in the world is useless unless you enjoy the actual daily practice, and can't wait to play when you get out of bed in the morning!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.