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

unpack(): Type N: not enough input, need 4, have 0

Discussion in 'Help' started by asters, Jul 5, 2017.

  1. asters

    asters Spider Jockey

    Messages:
    25
    I'm using latest pmmp from api3/blocks (I don't use poggit , just downloaded from GitHub)

    Error: unpack(): Type N: not enough input, need 4, have 0
    File: src/pocketmine/utils/Binary
    Line: 232
    Type: notice

    Code:
    [223]
    [224] /**
    [225] * Reads a 4-byte signed integer
    [226] *
    [227] * @param string $str
    [228] * @return int
    [229] */
    [230] public static function readInt(string $str) : int{
    [231] self::checkLength($str, 4);
    [232] return self::signInt(unpack("N", $str)[1]);
    [233] }
    [234]
    [235] /**
    [236] * Writes a 4-byte integer
    [237] *
    [238] * @param int $value
    [239] * @return string
    [240] */
    [241] public static function writeInt(int $value) : string{
    [242] return pack("N", $value);

    Backtrace:
    #0 (): pocketmine\{closure}(integer 2, string unpack(): Type N: not enough input, need 4, have 0, string phar:///root/PocketMine-MP.phar/src/pocketmine/utils/Binary.php, integer 232, array Array())
    #1 src/pocketmine/utils/Binary(232): unpack(string N, string )
    #2 src/pocketmine/level/format/io/region/RegionLoader(109): pocketmine\utils\Binary::readInt(string )
    #3 src/pocketmine/level/format/io/region/McRegion(342): pocketmine\level\format\io\region\RegionLoader->readChunk(integer 12, integer 8)
    #4 src/pocketmine/level/format/io/region/McRegion(290): pocketmine\level\format\io\region\McRegion->loadChunk(integer 12, integer 8, boolean )
    #5 src/pocketmine/level/Level(2503): pocketmine\level\format\io\region\McRegion->getChunk(integer 12, integer 8, boolean )
    #6 src/pocketmine/level/Level(2164): pocketmine\level\Level->loadChunk(integer 12, integer 8, boolean )
    #7 src/pocketmine/level/Level(2187): pocketmine\level\Level->getChunk(integer 12, integer 8, boolean )
    #8 src/pocketmine/level/generator/PopulationTask(53): pocketmine\level\Level->getAdjacentChunks(integer 13, integer 9)
    #9 src/pocketmine/level/Level(2783): pocketmine\level\generator\PopulationTask->__construct(pocketmine\level\Level object, pocketmine\level\format\Chunk object)
    #10 src/pocketmine/Player(872): pocketmine\level\Level->populateChunk(integer 13, integer 9)
    #11 src/pocketmine/Player(1764): pocketmine\Player->sendNextChunk()
    #12 src/pocketmine/Server(2441): pocketmine\Player->checkNetwork()
    #13 src/pocketmine/Server(2203): pocketmine\Server->tick()
    #14 src/pocketmine/Server(2082): pocketmine\Server->tickProcessor()
    #15 src/pocketmine/Server(1664): pocketmine\Server->start()
    #16 src/pocketmine/PocketMine(505): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///root/PocketMine-MP.phar/, string /root/, string /root/plugins/)
    #17 /root/PocketMine-MP.phar(1): require_once(string phar:///root/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

    PocketMine-MP version: 1.6.2dev #0 [Protocol 113; API 3.0.0-ALPHA6]
    Git commit: 0000000000000000000000000000000000000000
    uname -a: Linux change 2.6.32-48-pve #1 SMP Fri Dec 23 10:22:54 CET 2016 x86_64
    PHP Version: 7.0.3
    Zend version: 3.0.0
    OS : Linux, linux
     
  2. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    That looks like a corrupted world - where and when was it made?
     
    Last edited: Jul 5, 2017
  3. asters

    asters Spider Jockey

    Messages:
    25
    I used worlds plugin to generate a map :( . Now imma search for a MCPC MAP.
     
  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.