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

Solved error

Discussion in 'Development' started by nikoskon, Aug 26, 2018.

  1. nikoskon

    nikoskon Silverfish

    Messages:
    20
    hello i have a plugin that used to work but now i have this error and i cant seem to fix this!

    [10:30:32] [Server thread/CRITICAL]: [VaultChest] Could not execute task VaultChest\ParticleTask: Undefined property: VaultChest\ParticleTask::$owner
    [10:30:32] [Server thread/CRITICAL]: ErrorException: "Undefined property: VaultChest\ParticleTask::$owner" (EXCEPTION) in "ChestVault-master/src/VaultChest/ParticleTask" at line 20

    the line(s):
    public function onRun($currentTick){
    if($this->owner->isDisabled()) return; <- here
    foreach ($this->owner->getServer()->getLevels() as $lv) { <- and also here is owner used!

    did the api change in a way that i cannot go $this->owner ?
     
  2. RyanShaw

    RyanShaw Witch

    Messages:
    69
    No, you just didnt define $this->owner by the looks of it. Show us the constructor you have in your task class and the lines where you called this task to be executed so we can show you where you went wrong.
     
  3. nikoskon

    nikoskon Silverfish

    Messages:
    20
    nvm found my problem, i hadnt a constructor! My bad! :facepalm:
     
    xXNiceAssassinlo YT likes this.
  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.