Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2011, 12:45 AM
Niku Niku is offline
Member
 
Join Date: Aug 2011
Posts: 26
Gender: Male
Credits: 4,230
Niku is on a distinguished road
Default Adopt only one of each species

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?
Reply With Quote
  #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: 5,051
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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Untradeable Single Species: How? Kyttias Questions and Supports 4 12-01-2014 03:50 AM
Not able to delete a pet species Cremuex Levier Questions and Supports 4 04-03-2013 10:07 AM
Adopt pages, and general adopt/index page :L blondbananamix Questions and Supports 26 07-22-2011 12:12 PM
Species Names Beaux Questions and Supports 5 05-09-2011 04:07 PM
Is it possible not to display the species name of the adoptable in adopt center? Hall of Famer Questions and Supports 3 03-07-2010 06:54 PM


All times are GMT -5. The time now is 03:31 PM.

Currently Active Users: 9274 (0 members and 9274 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636