Mysidia Adoptables Support Forum  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-26-2013, 05:55 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 22,521
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by draugluin View Post

PHP Code:
 $gender = new TCell($adopt->getGender("gui"));
        if(
$currentlevel() == "0" $gender "Egg"); 
but it won't work.
It won't work for many reasons.

1) The if works like this:

PHP Code:
if(condition)
{
   do 
this;

2) $currentlevel is a variable, not a function (when you do this something() or something($stuff) or something($stuff, $stuff2) are functions).

3) "0" is a string, you probably want an integer, which is just 0.

4) $currentlevel even as a variable won't work, it's an empty variable. You must have meant $adopt->getCurrentLevel() which is a function that returns the current level of the object $adopt.

5) And this:
PHP Code:
$gender = new TCell($adopt->getGender("gui")) 
Gender is a TCell and below it you are saying it's a string ("Egg"). buildRow only accepts TCells. What you have to do is modify the getGender function so it outputs what you want (either images or strings). That function is associated with $adopt. So you have to see what the variable $adopt is.

PHP Code:
$adopt = new OwnedAdoptable($aid); 
You can see here, $adopt is an object/instance of the class OwnedAdoptable. That means that function is in the class_ownedadoptable file. In that file, you can see you have this variable visible to every function of that class:

PHP Code:
protected $currentlevel
Which can be used with $this->currentlevel.
Then go to the function

PHP Code:
public function getGender($fetchMode ""
And insert your condition there

PHP Code:
if($this->currentlevel == 0)
{
    return 
"Egg";

for example
(this in 1.3.3, not sure how if the newest version changed a lot...)
__________________


asp.net stole my soul.

Last edited by IntoRain; 11-26-2013 at 06:11 AM.
Reply With Quote
 


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 10:48 AM.

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