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

Solved help error transfer packet!!

Discussion in 'Development' started by Levi, Oct 31, 2017.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    error:
    Code:
    [21:21:38] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\server\DataPacketReceiveEvent' to 'FormAPI v1.0.0': Creating default object from empty value on jojoe77777\FormAPI\FormAPI
    [21:21:38] [Server thread/CRITICAL]: ErrorException: "Creating default object from empty value" (EXCEPTION) in "hcf/src/hcf/Task2" at line 44
    
    code Task2:
    PHP:
     $form $api->createSimpleForm(function (Player $player, array $args) {
                
    $result $args[0];
                if (
    $result === null) {
                    return;
                }
                switch (
    $result) {
                    case 
    0:
                    
    $pk = new TransferPacket();
    $pk->address "ip adresst"
    $pk->port 19132
    $player->dataPacket($pk);
                }
            });
     
  2. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    PHP:
    $pk = new TransferPacket();
    :facepalm:
     
  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.