View Single Post
  #1  
Old 02-09-2013, 05:11 PM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 32,010
Infernette is on a distinguished road
Default Problem with Adding Dimorphism?

Okay, I got it to work with alternates only showing with a specified gender, but for some reason it's making the type "NULL" in the mysql database, causing the adopt not to show up in the person's myadopts. So yeah... this is the edited part:

Code:
$petgender = $genders[$rand];
                 switch($petgender){
                          case "m": 
                          $alts = "yes";
                          break;
                          default: 
                          $alts = "no";
                        }                        

         $mysidia->user->changecash(-$row->cost);
		 $mysidia->page->settitle("{$name} adopted successfully");
		 $mysidia->db->insert("owned_adoptables", array("aid" => NULL, "type" => $row->type, "name" => $name, "owner" => $mysidia->user->username, "currentlevel" => 0, "totalclicks" => 0, "code" => $code, 
			                                            "imageurl" => NULL, "usealternates" => $alts, "tradestatus" => 'fortrade', "isfrozen" => 'no', "gender" => $genders[$rand], "lastbred" => 0));
What am I doing wrong? I knew it was too good to be true to work the first time around :p
Reply With Quote