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

Solved Underfined variable

Discussion in 'Development' started by armagadon159753, Sep 10, 2017.

  1. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    Code
    Underfined variable $this
    PHP:
    <?php

    namespace HiggsInc\onevsone\model;

    use 
    pocketmine\scheduler\PluginTask;
    use 
    pocketmine\utils\TextFormat;


    class 
    SignRefreshTask extends PluginTask{
      
        
    /** var ArenaManager **/
        
    public $arenaManager;
      
        public function 
    onRun(int $currentTick);
            
    $this->arenaManager->refreshSigns();
        }
      
    }
     
  2. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    I doubt that. the `arenaManager` property is uninitialized however, you don't initialize it in the constructor.
     
  3. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    More importantly, your onRun function has a semicolon instead of the opening curly braces.
     
  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.