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
  #11  
Old 03-08-2016, 12:15 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 32,822
Ittermat is on a distinguished road
Default

Yes automatically getting the items and money is fine! Also no need to worry about 2 right now..maybe later? And 3 ill mess with lol. As for status effects is it possible to give me bases for what different things can be done? Id like the effects to do things to them, and if possible have the pet say something like if they gain am item or lose money or something? But im unsure what i want the status effects to say lol..ill think more on it and use what you gave me when i get home from work ^_^

Also thank you again you are amazing!

_______

EDIT EDIT:

Heres some ideas for status effects.. if you give me the base coding to use I can modify from there for these. (like have it set the effects- but allow me to change what it says and add more of them to it you know?)

Status effects:


-Looks like ( Petname) found a some food! They've gained some exp! (Gains Clicks)

- (petname) Ate some garbage! Gross!

-Oh no! (Petname) has been cursed! (Clicks reset for day)

-They grow up so fast dont they? Lets fix that! (petname) is now a baby again! (reverts to baby stage)

-(petname) Won a fight! They gained a level! (gains one level)

-The love fairy came by and waved her wand! (petname) can now breed again! (enables breeding again)

-A mad scientist is loose! (Petname) no longer has species barriers when being bred! (Enables cross species breeding)

-----



Edit: Where do I put this code in at btw?

Last edited by Ittermat; 03-08-2016 at 06:08 PM.
Reply With Quote
  #12  
Old 03-09-2016, 06:07 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,484
Hall of Famer is on a distinguished road
Default

Well when debugging your site, I find that it has a very serious glitch resulted from this Active Pet Module. For a newly registered user, they do not own any adoptable yet, and therefore do not have favorite pet. However, the script assumes that this new user has favorite pet, and try to fetch the adoptable ID 0 instead(favorite pet ID defaults to 0 if it does not exist). This leads to an uncaught exception 'adoptable ID does not exist', and will prevent any newly registered users from browsing your site.

To fix this, you need to take care of the scenario in which the user has no favorite pet(ID = 0). In this case, you will either just not fetch adoptable at all, or catch exception using a try...catch block. The choice is up to you.


Edit: Strangely the solution Kyttias offered seems to have taken care of nonexistent favorite pet ID already, but when I dont have a favorite pet I still receive errors. Did you copy/paste her code exactly? Or something else is wrong?
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #13  
Old 03-09-2016, 06:31 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 32,822
Ittermat is on a distinguished road
Default

I copy pasted..the first code she put up- but i havent done anything with her second one since Im not sure exactly where to put it.
Reply With Quote
  #14  
Old 03-09-2016, 06:34 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,969
Kyttias is on a distinguished road
Default

The code (with all the percent discussion) isn't done yet/doesn't do anything yet. It'll go inside the setFavPetSB() we made, inside the else half of the if statement, all this inside class_sidebar.php.

Sorry, I've had along day and don't think I can work on this tonight - good news is that I don't have work again until at least Sunday so I'll have a few days to think on all of this.

edit - @HoF, I vaguely remember this issue but I'm not sure how it was resolved. =/
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 03-09-2016 at 06:37 PM.
Reply With Quote
  #15  
Old 03-09-2016, 06:35 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 32,822
Ittermat is on a distinguished road
Default

no its fine kyttias! I know you have a life... Im sorry to be so bothersome..Im seriously bad at this coding thing...I am trying to learn though honest...its just not clicking or sticking..
Reply With Quote
  #16  
Old 03-10-2016, 02:44 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 32,822
Ittermat is on a distinguished road
Default

I tried to fix the error- but couldnt so for now I just removed the active pet widget until we can figure out how to fix that problem XD
Reply With Quote
  #17  
Old 03-20-2016, 12:33 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 32,822
Ittermat is on a distinguished road
Default

Did we ever figure out how to fix this?

I even made an adoptable to put in its place-when one has no favorite pet



The Adoptable id (in adopt_Adoptables table) is 30

if that helps any?

Last edited by Ittermat; 03-20-2016 at 12:58 PM.
Reply With Quote
  #18  
Old 03-20-2016, 02:03 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,969
Kyttias is on a distinguished road
Default

Actually the above won't work because if the user doesn't own pet 30 it might cause errors.

Send me the code we put in classes/class_sidebar.php - I'd like to make some changes to it.

PHP Code:
protected function setFavPetSB(){
    
$mysidia Registry::get("mysidia");
    
$profile $mysidia->user->getprofile();
    
    if (
$this->userfavpet == "0"){
        
$this->FavPetSB = new Paragraph
        
$this->FavPetSB->add(new Comment("<b>No Favorite Pet Set</b>"));
    }

    if (
$profile->getFavpetID() != "0"){
        
$favpet = new OwnedAdoptable($profile->getFavpetID());
        
$this->FavPetSB = new Paragraph
        
$this->FavPetSB->add(new Comment("<b>Favorite Pet!</b> <br/>
            <a href='/myadopts/manage/
{$favpet}'><img src='{$favpet->getImage()}'></a>
            "
));
    }

    
$this->setDivision($this->FavPetSB);

I'm changing where we get information from, basically. And then we're more closely checking only if its zero or not zero. If it's empty, at least it won't error.

If you're afraid of editting the code, I can do it.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #19  
Old 03-20-2016, 02:07 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 32,822
Ittermat is on a distinguished road
Default

all of the coding you gave me is on the first page.. 0.o....I havent done anything to it..
Also im not sure how I would edit it... XD
Reply With Quote
  #20  
Old 03-20-2016, 02:25 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,969
Kyttias is on a distinguished road
Default

If you haven't done anything to it then you should be able to just replace it.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
Reply

Thread Tools
Display Modes

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


All times are GMT -5. The time now is 01:33 PM.

Currently Active Users: 437 (0 members and 437 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