Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
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,919
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
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:13 AM.

Currently Active Users: 3123 (0 members and 3123 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636