View Single Post
  #2  
Old 08-13-2011, 02:51 AM
Chibi_Chicken Chibi_Chicken is offline
Niwatori Kami
 
Join Date: Jun 2011
Posts: 63
Gender: Unknown/Other
Credits: 7,422
Chibi_Chicken is on a distinguished road
Default

Here is the problem, in the inc/functions.php look for:

This starts on line 429.
PHP Code:
$query "SELECT * FROM ".$GLOBALS['prefix']."owned_adoptables WHERE owner='$loggedinname' and type='$type'";
            
$result runquery($query);
            
$num mysql_numrows($result);

            if(
$num $row['morelessnum']) { 
and replace it with:

PHP Code:
$query "SELECT * FROM ".$GLOBALS['prefix']."owned_adoptables WHERE owner='$loggedinname' and type='".$row['type']."'";
            
$result runquery($query);
            
$num mysql_numrows($result);

            if(
$num >= $row['morelessnum']) { 
That should allow you to now limit your users to the right number of adopts
The errors were $query was trying to get the type of pet from the wrong place and the if statement was only checking if you went over, not over and equal too.
Reply With Quote