Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.1.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=20)
-   -   Breeding System - Complete! (http://www.mysidiaadoptables.com/forum/showthread.php?t=1156)

Ashje 12-18-2009 01:18 AM

RE: Breeding System - Complete!
 
I'll give it a shot, thanks for the help. XD

gjac1 12-18-2009 11:40 AM

RE: Breeding System - Complete!
 
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 :)

Arianna 12-18-2009 01:02 PM

RE: Breeding System - Complete!
 
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. :)

Ashje 12-21-2009 04:23 PM

RE: Breeding System - Complete!
 
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.

Arianna 12-22-2009 01:06 AM

RE: Breeding System - Complete!
 
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. :)

Ashje 12-23-2009 04:34 AM

RE: Breeding System - Complete!
 
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 Code:

             $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 Code:

             $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.

Arianna 12-23-2009 04:38 AM

RE: Breeding System - Complete!
 
Hmm, maybe...
PHP Code:

  $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>"


mapleblade 12-23-2009 09:03 AM

RE: Breeding System - Complete!
 
well it works fine at me, butthe new adoptable egg doesnt show up in myadopts.php?

Arianna 12-23-2009 10:17 AM

RE: Breeding System - Complete!
 
That's weird. Are you sure you have the right colums in your table?

Ashje 12-23-2009 09:40 PM

RE: Breeding System - Complete!
 
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 Code:

mysql_query($query); 

back in but left out
PHP Code:

$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


All times are GMT -5. The time now is 11:41 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.