These are chat archives for PEMapModder/PocketMine-Plugin-Tutorials

14th
May 2016
Glitch_Player
@GlitchPlayer
May 14 2016 11:04
Can someone help me from this code?
  }elseif($args[0] === "tp" and $sender->hasPermission("pet.cmd.tp")) {
    if($sender instanceof Player);
    if($args[1] === null and $args[2] !== null) {
      $sender->sendMessage(TF::GREEN."Pet Teleporting...");
      $pet->teleport($sender->getPosition());
      $sender->sendMessage(TF::GREEN."Pet Teleported!");
      // $sender->sendMessage(TF::RED."Functionality not implemented yet");
      return true;
    }
    return true;
  }
  return false;
}
return false;
}
This error shows up

Notice: Undefined offset: 1 in C:\Users\glitc\Documents\Genisys\plugins\Pets-php7\src\Pets\Pets.php on line 91

Notice: Undefined offset: 2 in C:\Users\glitc\Documents\Genisys\plugins\Pets-php7\src\Pets\Pets.php on line 91

Tim (robske_110)
@robske110
May 14 2016 12:00
This is pocketmine
And you should use isset(
Glitch_Player
@GlitchPlayer
May 14 2016 12:16
K thanks