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

What is wrong?

Discussion in 'Development' started by IchHackeNet, Jul 18, 2019.

  1. IchHackeNet

    IchHackeNet Creeper

    Messages:
    5
    GitHub:
    IchHackeNetDEV
    What is wrong on this file?
    PHP:
    <?php

    namespace Server;

    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\command\CommandSender;

    use 
    pocketmine\command\Command;
    use 
    jojoe77777\FormAPI\SimpleForm;

    class 
    Main extends PluginBase{

    public function 
    openHelpUI(Player $player)
    {
            
    $form = new SimpleForm
    (function (Player $playerint $data
    =null){

    $form->-setContent("§rTeleporter");
    $form->-addbutton ("§3Citybuild");
    $form->-addbutton("§aFarmwelt");
    $form->-setbutton("§3Citybuild")
    $form->-setbutton("§aFarmwelt")
    }
    }
    }
     
  2. KielKing

    KielKing Zombie

    Messages:
    245
    GitHub:
    kielking
    This forum is not a PHP Tester

    Run your server and see what's the error, and start from there
    from the looks of it, you should learn PHP Syntax first. You can learn from
    https://codecademy.com
    https://sololearn.com

    if you want a piece of more detailed information you can look at the docs
    https://php.net
     
    Muqsit and EdwardHamHam like this.
  3. Wertzui123

    Wertzui123 Spider

    Messages:
    11
    GitHub:
    wertzui123
    @IchHackeNet First, "->-"??? Why a - after the >?
    Also, it does work, but the UI won't open ever, exeped you use another plugin to run the code.
     
  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.