I don't believe its working. I've tried doing a clean install and everything, but no matter what you can adopt unlimited adopts of XX species, even though i set it to 0 or 1. OTL
can anyone help me?
Here is the problem, in the inc/functions.php look for:
This starts on line 429.
PHP:
$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:
$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.