Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #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: 23,877
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
  #2  
Old 02-09-2013, 05:54 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 335,039
Hall of Famer is on a distinguished road
Default

the property $row->type does not exist, which will be holding a default Null value if you attempt to use it. You need to define what the adoptables type is, and replace $row->type by the appropriate variable name.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 02-09-2013, 06:14 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: 23,877
Infernette is on a distinguished road
Default

Oh. Derp. That fixed it, thanks xD Should of realized that :p

Also is it possible to remove showing gender from a level until you level it up?

Last edited by Infernette; 02-09-2013 at 06:22 PM.
Reply With Quote
  #4  
Old 02-10-2013, 12:03 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 335,039
Hall of Famer is on a distinguished road
Default

Yeah, its possible, the issue is how complicated you want it to be. If all you need is to show the gender after a global level set for all adoptables, it can be done in a few secs. If you want this to be species-specific, it can take much longer as you need to create a new field in table prefix_adoptables to store this level for each adoptable.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 02-10-2013, 12:41 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: 23,877
Infernette is on a distinguished road
Default

It would be global, so it's good to know it can be easily done :)

But um... Where do I place the code; sorry once again.

Last edited by Infernette; 02-11-2013 at 06:33 AM.
Reply With Quote
  #6  
Old 02-13-2013, 07:32 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,450
SilverDragonTears is on a distinguished road
Default

Anywhere where you show the gender. Something like

if level == '#'{
echo a blank or something
}else{
show the gender
}
__________________

Check out SilvaTales
Reply With Quote
  #7  
Old 02-13-2013, 04:55 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: 23,877
Infernette is on a distinguished road
Default

Okay, I edited the script you posted Silver to work with my current version and it works just fine. Thanks :)
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a Theme PokeFerno Questions and Supports 3 05-13-2014 03:47 PM
Adding Databases Kesstryl Questions and Supports 4 06-08-2012 06:47 AM
Adding new adoptables? Slix Questions and Supports 0 07-05-2011 11:12 AM
adding images Nemesis Questions and Supports 11 04-10-2011 11:00 AM
Adding adoptable >.< blondbananamix Questions and Supports 12 03-20-2011 05:29 PM


All times are GMT -5. The time now is 05:01 PM.

Currently Active Users: 9819 (0 members and 9819 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636