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

BinaryStream.php on line 367 error

Discussion in 'Development' started by Driesboy, Jun 24, 2017.

  1. Driesboy

    Driesboy Spider Jockey

    Messages:
    34
    GitHub:
    driesboy
    Code:
    [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerJoinEvent' src/pocketmine/utils/BinaryStream.php on line 367
    
    [07:45:55] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\utils\Binary::writeVarLong() must be of the type integer, null given, called in src/pocketmine/utils/BinaryStream.php on line 367" (EXCEPTION) in "/src/pocketmine/utils/Binary" at line 546
    PHP:
    $ev->getPlayer()->setGamemode("1");
    $pk = new ContainerSetContentPacket();
    $pk->windowid ContainerSetContentPacket::SPECIAL_CREATIVE;
    $ev->getPlayer()->dataPacket($pk);
     
  2. Driesboy

    Driesboy Spider Jockey

    Messages:
    34
    GitHub:
    driesboy
    why it is not working?
    this code worked before the 1.1 update
     
  3. Driesboy

    Driesboy Spider Jockey

    Messages:
    34
    GitHub:
    driesboy
    never mind fixed
     
  4. Driesboy

    Driesboy Spider Jockey

    Messages:
    34
    GitHub:
    driesboy
    $pk->targetEid = $ev->getPlayer()->getId();
     
  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.