Not understanding this code

Forum
Last Post
Threads / Messages

SilverDragonTears

I am your Nemesis.
Premium Member
Joined
Jun 1, 2011
Messages
1,113
Points
36
Mysidian Dollar
51,802
If anyone can help I'm trying to insert yes or no allow alternateimages and i'm testing it out on the ones that have alt images but keep getting no. So I want to know if this code even works that I put together and what is the odds of getting an alt image?

Code:
$rarealts = $adopt->getRareAltStatus();{
        if($this->rarealts == "enabled" and $this->currentlevel == $this->altoutlevel){
            $rand = mt_rand(1, $this->altchance);
            if($rand == 1) $userarealternates = "yes";            
        }
        else $userarealternates = "no";
    }
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,119
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top