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

How to fix

Discussion in 'Development' started by Hoangviphb999, Aug 26, 2022.

  1. Hoangviphb999

    Hoangviphb999 Silverfish

    Messages:
    21
    GitHub:
    Hoangviphb999
    Well im really doesn't know how to fix that error:
    PocketMine-MP Crash Dump Fri Aug 26 21:05:39 WIB 2022

    PocketMine-MP version: 4.6.1+dev [Protocol 534]
    Git commit: ee51af8d637cdcac5c60345ca2d60a6a2b05d880
    PHP version: 8.0.19
    OS: WINNT, win

    THIS CRASH WAS CAUSED BY A PLUGIN
    BAD PLUGIN: BedWars

    Error: Typed property BedWars\game\GameListener::$game must not be accessed before initialization
    File: plugins/BedWars/src/BedWars/game/GameListener
    Line: 167
    Type: Error

    As my varrable was set as:

    private Game $game;

    if ($this->game->getMode()){
    }

    Any solutions ?
     
  2. EndermannbugZJFC

    EndermannbugZJFC Slime

    Messages:
    84
    GitHub:
    endermanbugzjfc
    Your variable is not set, just declared. It holds no value and therefore is "undefined". Define it with `$this->game = ...`.
     
  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.