Quote:
Originally Posted by Dinocanid
Fixed them!
The adoptable ID 0 thing is an ongoing issue that I can't seem to find a fix for. It happens because new users don't automatically have a favpet when they sign up. I'm working on it though.
|
I'm not sure in what context you are having the error, but as I heavily rely on favpets for my site I have codes in place (thanks to various Mysidia users <3):
Example of an explore page (you need a companion to explore):
PHP Code:
if ((int)$profile->getFavpetID() == 0) {
$document->addLangVar('It seems you do not yet have not assigned a companion! Assign one and then come back.');
return;
}
Example of my sidebar:
PHP Code:
if ($profile->getFavpetID() == "0"){
$this->FavPetSB = new Paragraph;
$this->FavPetSB->add(new Comment("<center><b>No Companion</b><br><a href='http://inekel.mysidiahost.com/account/profile'>Choose one!</a></center>"));
}
I hope this helps?