Breeding System - Complete!

Forum
Last Post
Threads / Messages
I'm sorry, I've been busy. I can try and troubleshoot, though.
Maybe, try changing it back to breeding.php. There may be some file links, which could be disrupting it. :)
Have you installed the gender system/given existing pets genders? I had to do it manually, by making the default value 'female', then changing the rest to male.
 
err i dont have complted the gender system because in a part,when ichanged the code i can managae the new charatcer!
 
SieghartZeke said:
err i dont have complted the gender system because in a part,when ichanged the code i can managae the new charatcer!

That is why you are getting the error then. the script is looking for the gender in the database & it's not there.
 
I installed this addon, and get the two warnings below:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in public_html/adoption/breeding.php on line 81

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in public_html/adoption/breeding.php on line 99

Dunno if the breeding system will still work. XD
 
But when i add a code,4 the gender, i dont show the new adoptable!
And 4 the Sql ,i dont know where to put ...and what put.....
 
I don't get what you're trying to say now... Are you saying you're having problems with this code, or with the gender code?
Why don't you just add the gender table, give the pets genders, and see if the breeding system works. Then we can work on the inserting into the table/
 
No with the breeding no....is the gender that give me problem!
When i add this code:

Code:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender')");

The character that i adopt say that is not in the database...and sorry 4 the bad grammar but im italian and i have so many problme to traslate the word that i say.....

Then......i need to add a new table in owned adoptable...but i dont know what i need to put!
 
Adding a row to a table is quite easy & in the Breeding system it is listed how to set it. Please, just try to read and learn a bit so that you can understand at least some of what you are told. http://www.w3schools.com/PHP/php_mysql_intro.asp

Sea
 
Hi, Thank you for posting this. It's excellent. My problem is that once an egg is successfully bread ( is that the past tense of breed? Bread? Not the food bread T.T) it isn't transferred to the user's account. The only edit I've made is changing the required levels from 2 to 0. If you have time, could you please help? Oh and I'm using your gender system as well. Also very awesome.

Thanks,
Ashje =D
 
Cool! I don't know why - why don't you try this. After where it's supposed to insert it, write:
PHP:
$article_content = $article_content . $query;
This will allow you to see your query, and check if something is going wrong. Maybe you don't have the same number of columns as I do (I have a date column, too) so you might want to check that.
==
Lol, I just noticed that we don't do that in the query. If you put it in an external string, you can echo it. For now, try removing '$date', from the sting.
 
Arianna, how much work do you think it would be to add a cost system to this mod ??

At the moment members can just breed as many as they like but if it costs them credits then it will limit the amount they can breed :)
 
Not much, just send me a PM and I can try and get it to work, especially as that would be good for my site, too. :)
 
Hi Arianna,

I tried removing the date codes but it still isn't transferring the newly born adoptable to the user's account. If you could, please help.

Thanks,
Ashje.
 
Hmm... That still is very weird. Could you make a line, after it's supposed to insert it, which echoes the query (or goes $article_content = $article_content . $query;, I guess) and paste that in. We can compare it to your table, then, to see what's wrong. :)
 
Thank you,

I'll try it as soon as my FTP gets up and running again. :D I'm excited, I'm learning PHP. XD

So I would say...
PHP:
             $name = $new_name;

               mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no','$gender')");
               $article_content = $article_content . $query;
               $article_content = $article_content."<p><img src='".$eggimage."'><br /><a href='myadopts.php'>Manage ".$name." now!</a>
               It's type is ".$type." and it was born on ".$date."! You can change its name to your liking.</p>";

or

PHP:
             $name = $new_name;

               mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no','$gender')");
               $article_content = $article_content. $query."<p><img src='".$eggimage."'><br /><a href='myadopts.php'>Manage ".$name." now!</a>
               It's type is ".$type." and it was born on ".$date."! You can change its name to your liking.</p>";

Thanks,
Ashje.
 
Hmm, maybe...
PHP:
  $query = "INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no','$gender')";
mysql_query($query);
               $article_content = $article_content. $query."<p><img src='".$eggimage."'><br /><a href='myadopts.php'>Manage ".$name." now!</a>
               It's type is ".$type." and it was born on ".$date."! You can change its name to your liking.</p>";
 
well it works fine at me, butthe new adoptable egg doesnt show up in myadopts.php?
 
That's weird. Are you sure you have the right colums in your table?
 
Hi Arianna,
I tried that and it worked! The adoptables were being inserted into the database. Problem is, it was showing the query on the page. So I removed your edit and it stopped working again. So then I put
PHP:
mysql_query($query);
back in but left out
PHP:
$query.
and it hid the query but still inserted the new adopt into the database. I think that was the problem. Anyway, thank you for the support. The script is awesome. XD

Ashje
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,122
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top