![]() |
Freezing and limiting adoptables
Heya,
I am using the mod that allows only a set amount of "young" pets to be adopted at a time. Now with the freezing, if a user freezes a pet then I want to set it up so that pet no longer counts as one of their "young" so that members might have pets in many different stages and not be penalized for having them if they are frozen. What area of the tables would I need to look at to exclude frozen pets from the count as I do with "older" pets? Sea |
RE: Freezing and limiting adoptables
I don't have the script, but it should work if you go to where it excludes the older ones, copy the script and replace "old" or whatever with freeze.
|
RE: Freezing and limiting adoptables
Quote:
|
RE: Freezing and limiting adoptables
Look in functions.php, at the canadopt function.
If you wanted to make it where users can only adopt a certain number of this type of pet, however frozen ones of this type do not count, in functions.php you would find: PHP Code:
PHP Code:
PHP Code:
Brandon |
RE: Freezing and limiting adoptables
Not Quite what I am needing...
This is a revision of the code I was using which was on the adopt page with the last version... Code:
//Defines what level is used for mature count and number of babies user may adopt Sea |
RE: Freezing and limiting adoptables
It's not working how? Do you get an error at all or it just seems to be ignored?
I think the problem is that after your IF you don't have an else to proceed with the adoption. So, even if your condition is true then it is not obeyed as something else later overrides it. It should be... PHP Code:
|
RE: Freezing and limiting adoptables
Still ignoring.. no errors.. just ignoring... larger section of code offered...
Code:
//Defines what level is used for mature count and number of babies user may adopt |
RE: Freezing and limiting adoptables
Did you by chance use a different table prefix other than adopts_ when you installed? Your code is using adopts_ rather than the $prefix variable, so that may be the case.
Also, try echoing out $num using an echo statement. It should appear at the top of the page. Is the number correct or something else? |
RE: Freezing and limiting adoptables
adopts_ is correct prefix & I am showing the adoptable (6 total random) but it is just ignoring the 5 limit for total amount of adoptables under level 5. An account with 6 pets level 4 and under is still being offered and can adopt.
total code Code:
<?php Sea |
RE: Freezing and limiting adoptables
For this:
PHP Code:
PHP Code:
|
RE: Freezing and limiting adoptables
Number: doesn't appear anywhere on the page.
Sea EDIT: it is flashing a grey screen real quick and saying 4 on this account... On the account I have been using to test which has 4 level 0 pets its is flashing a grey screen with number 0 |
RE: Freezing and limiting adoptables
Ok, that's really weird that the count is wrong. I'll see if I can think of anything...
Maybe try putting your code not on the adoption page, but in functions.php inside of the canadopt() function. |
RE: Freezing and limiting adoptables
I think I figured it out.. not sure haven't tested it but if I am right it will work out on it's own. It appears the system is not seeing some of the adoptables from the old script so it can't count them as being there.
That's the theory, I will watch it a few days and see what happens. Sea |
RE: Freezing and limiting adoptables
Quote:
|
All times are GMT -5. The time now is 11:34 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.