View Single Post
  #13  
Old 11-26-2016, 07:40 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 113,148
Abronsyth is on a distinguished road
Default

Quote:
Originally Posted by Dinocanid View Post
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?
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote