Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Error of SetBlock()

Comments in 'Plugin Development' started by Valeron, Nov 16, 2015.

  1. Valeron
    Offline

    Valeron New Member

    Joined:
    Aug 26, 2015
    Posts:
    111
    Minecraft User:
    DarkSpive
    PocketMine-MP Crash Dump Mon Nov 16 13:51:12 UTC 2015

    Error: Call to a member function setBlock() on string
    File: /CastleFlags/src/cas/main
    Line: 156
    Type: E_ERROR

    THIS CRASH WAS CAUSED BY A PLUGIN
    BAD PLUGIN: ctf v0.0.1

    Code:
    [147] $yK5 = 0;
    [148] $zk5 = 0;
    [149] $xK6 = 0;
    [150] $yK6 = 0;
    [151] $zk6 = 0;
    [152] $xB = 96;
    [153] $yB = 70;
    [154] $zB = 130;
    [155] $this->getServer()->getInstance()->broadcastMessage("[CTF] Красный украл алмазный блок! Украл его : {$robReds}.\n Координаты сломанного флага: {$xK} {$yK} {$zK}");
    [156] $this->world->setBlock(new Vector3($xB, $yB, $zB), Block::get(0,0));
    [157] }


    Why? Crashdump
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Use
    PHP:
    $this->getServer()->getLevelByName($this->world)->setBlock(new Vector3($xB$yB$zB), Block::get(Block::AIR));
    Valeron likes this.
  3. Valeron
    Offline

    Valeron New Member

    Joined:
    Aug 26, 2015
    Posts:
    111
    Minecraft User:
    DarkSpive
    PocketMine-MP Crash Dump Mon Nov 16 14:15:46 UTC 2015

    Error: syntax error, unexpected '$yB' (T_VARIABLE)
    File: /CastleFlags/src/cas/main
    Line: 156
    Type: E_PARSE

    THIS CRASH WAS CAUSED BY A PLUGIN

    Code:
    [147] $yK5 = 0;
    [148] $zk5 = 0;
    [149] $xK6 = 0;
    [150] $yK6 = 0;
    [151] $zk6 = 0;
    [152] $xB = 96;
    [153] $yB = 70;
    [154] $zB = 130;
    [155] $this->getServer()->getInstance()->broadcastMessage("[CTF] Красный украл алмазный блок! Украл его : {$robReds}.\n Координаты сломанного флага: {$xK} {$yK} {$zK}");
    [156] $this->getServer()->getLevelByName($this->world)->setBlock(new Vector3($xB, $yB, $zB), Block::get(0,0));
    [157] }
    [158] }
    [159] }
    [160] } //НАПИСАТЬ ФУНКЦИЮ ДЛЯ СИНЕГО ФЛАГА!!!!!!!!!!
    [161]
    [162] public function onTeamBaseRed(PlayerMoveEvent $event){
    [163] $captu
  4. Valeron
    Offline

    Valeron New Member

    Joined:
    Aug 26, 2015
    Posts:
    111
    Minecraft User:
    DarkSpive
    Does not works

Share This Page

Advertisement