Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Limiting number of eggs and hatchlings (http://www.mysidiaadoptables.com/forum/showthread.php?t=3671)

SilverDragonTears 05-04-2012 09:15 PM

Limiting number of eggs and hatchlings
 
Currently I have this which says if you have more than 5 eggs you can't adopt.

Code:

$stmt = $adopts->query("SELECT * FROM ".constant("PREFIX")."owned_adoptables WHERE owner='".$loggedinname."' AND currentlevel<='3' AND isfrozen='no'");
$data = $stmt->fetchAll();
$num = count($data);

if($num >= 5){
$canadopt = "no";
$article_title = "Too many eggs!"; $article_content = "You already have too many eggs to take care of! Come back once you have hatched an egg!";
}

How can I change this so that you can't have more than 5 eggs AND say... 10 hatchilings at a time?

Kesstryl 05-05-2012 08:44 AM

this is brilliant, which program did you insert this code to, and what line? I'd be happy with just the limiting eggs.


All times are GMT -5. The time now is 10:48 PM.

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