View Single Post
  #1  
Old 03-09-2016, 12:49 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 135,885
Kyttias is on a distinguished road
Default

I updated the code above, give it a shot?

I can also try to make an addendum to the family tree code to prevent nonexistent pets from displaying. That'll definitely be easier in the long run, I think. (Actually no, it wasn't, I learned something from HoF in the process.)

Basically, in the family tree code, we need to wrap the offspring in a try/catch statement, so find the foreach loop:
PHP Code:
foreach($offsprings as $offspring){
    if (
$offspring != 0){
        try { 
            
$child = new OwnedAdoptable($offspring);
            
$babies[] = ""# THIS LINE IS JUST REALLY LONG SO I LEFT IT EMPTY, IT'LL HAVE STUFF IN IT
        
} catch (AdoptNotfoundException $anfe) { /* Ignore the error. */}
    }

I hope you can find that/it makes sense. @w@...
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 03-09-2016 at 02:08 AM.
Reply With Quote