View Single Post
  #6  
Old 04-22-2015, 09:35 AM
kristhasirah's Avatar
kristhasirah kristhasirah is offline
Member
 
Join Date: Jan 2010
Location: In middle of the nothingness
Posts: 196
Gender: Female
Credits: 28,984
kristhasirah
Default

Found the problem for the missing null in the data base,
in class_stockadopt in the $mysidia->db->insert the imageurl had only "" instead of NULL

and for the always geting an alt image in the adoptshop, i had to replace
PHP Code:
protected function getaltstatus($level) {
      
// This method determines if we will use alternate images...
      
$altstatus "no";
      
$run "no";
       
      
// Let's see if the level we are on is the level that requires alternates
      
if($this->alternates == "enabled" and $level == $this->altoutlevel$run "yes";
      if(
$run == "yes") {
         
$randnum rand(1$row->altchance);
         if(
$randnum == 1$altstatus "yes"// If we pull a 1 as the random number, we use the alternate images :)
      
}
      return 
$altstatus;
  } 
for:
PHP Code:
protected function getaltstatus($level) {
      
// This method determines if we will use alternate images...
      
$altstatus "no";
      
$run "no";
       
      if(
$this->alternates == "enabled" and $this->altoutlevel == 0){
            
$rand mt_rand(1$this->altchance);
            if(
$rand == 1) return "yes";            
        }
      return 
"no";
  } 
which is only a copy paste of the code found in the class/class_adoptable.php

but is working and now i have random normal and alt adopts in the adoptsshop.

posting this in case someone else has the same problem as me

note: probably i had that problem because im using a lower number in the alt area (2)... but still i dont think is supposed to give me 20 alts of 20 adopted pets in the shop ._O
__________________
Reply With Quote