View Single Post
  #1  
Old 12-15-2011, 02:55 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 111,641
SilverDragonTears is on a distinguished road
Default Produce Certain adopt...

So I've coded this so that it will produce a certain offspring from two adopts. It works... but sometimes it says "Congrats. Blah blah... You've produced a baby 1"

The baby 1 is when it doesn't get a type for the adoptable. It only does this sometimes but more often than not it works. Can anyone see why it would produce a 1?

PHP Code:
            // we choose the type!

            
if ($female_type == 'Autumn Silvfox' && $male_type == 'Autumn Silvfox'){
            
$female_type 'Autumn Silvfox' && $male_type 'Autumn Silvfox';
            
$types = array($female_type$male_type);
            
$typerand rand(0,1); }
            if (
$female_type == 'White Stitch Silvfox Beta' && $male_type == 'White Stitch Silvfox Beta'){
            
$female_type 'White Stitch Silvfox' && $male_type 'White Stitch Silvfox';
            
$types = array($female_type$male_type);
            
$typerand rand(0,1); }
            if (
$female_type == 'Red Stitch Silvfox Beta' && $male_type == 'Red Stitch Silvfox Beta'){
            
$female_type 'Red Stitch Silvfox' && $male_type 'Red Stitch Silvfox';
            
$typerand rand(0,1); }
            if (
$female_type == 'Noctis Silvfox Beta' && $male_type == 'Noctis Silvfox Beta'){
            
$female_type 'Noctis Silvfox' && $male_type 'Noctis Silvfox';
            
$typerand rand(0,1); }
            
$types = array($female_type$male_type);
            
$typerand rand(0,1); 
__________________

Check out SilvaTales
Reply With Quote