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

Cloned/new map objects return empty value

Discussion in 'Development' started by xBeastMode, Mar 26, 2017.

  1. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    When I create or clone a map (item) object inside a class called on PlayerInteractEvent, it comes out empty with this error:
    Code:
    Warning: Creating default object from empty value in C:\Users\*****\Downloads\PocketMine-MP\plugins\MapImage\src\MapImage\Renderer\ImageRenderer.php on line 41
    This is line 41:
    PHP:
    $map Item::get(Item::MAP01);
    I know that maps are not yet implemented or registered into the item list, and even though I tried registering a "fake" map class into the item list, the same error occurs everytime.
     
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Is Item::MAP even defined?
     
  3. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    Of course, it is defined as id 395, when I use "/give <name> 395" I get an empty map. I'm using PocketMine 1.6.2dev or something like that.
     
  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.