I'm making a timer but it doesn't work. Why?? This is the error part "Undefined property: ring\rang::$Clock" (EXCEPTION) PHP: public function Clock(){ $this->getServer()->broadcastTip("{$this->Clock}Second Left"); $this->Clock--; } and here is using task part of that PHP: class Count extends Task{ public function __construct(rang $rang){ $this->rang = $rang; $this->Clock = 300; } public function onRun(int $currentTick){ $this->rang->Clock(); }}
I did what you said but now it says error of what you said.. Where should I put that? and Why should I use that?
These are properties. You must add $rang, $Clock property to Clock.php and $Clock property to rang.php.