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 04-25-2015, 02:19 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 137,383
Kyttias is on a distinguished road
Default

Does the pet you are looking at have a next level? For example, the maximum level I have on my test site for pets is level 4. If the pet is level 4, it has no next level, and therefore calling getNextLevel() would make the function, and therefore the variable holding the function, hold the value of FALSE, an empty value.

My recommended use of getNextLevel() would be something like:
PHP Code:
if($this->hasNextLevel()){
    
$level $this->getNextLevel();
    
$levelupClicks $this->getLevelupClicks();
    
$toNext "(LVL ".$level->getLevel()." in ".$levelupClicks." more EXP)"
}
else 
$toNext "(MAX)"
and then returning $toNext. But I'm dealing with v1.3.4, and I'm not sure how different things are. I'm currently doing the above in getStats(), another function in the ownedadoptables class.
__________________
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; 04-25-2015 at 02:21 AM.
Reply With Quote
  #2  
Old 04-25-2015, 08:41 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 70,826
Hwona is on a distinguished road
Default Re

Thank you so much Kyttias! For some reason, that works perfectly! :D
__________________
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with a item function kristhasirah Questions and Supports 35 04-03-2017 10:17 AM
Item Function Suggestions NobodysHero Suggestions and Feature Requests 5 06-23-2014 03:45 AM
Add a new function in the myadopts page? Infernette Questions and Supports 8 07-02-2013 12:12 PM
Help in PHP function lovejenete Other Chat 3 12-06-2009 08:46 AM


All times are GMT -5. The time now is 05:43 AM.

Currently Active Users: 9324 (0 members and 9324 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636