Bug in the adopt shops

Forum
Last Post
Threads / Messages

kristhasirah

Member
Member
Joined
Jan 22, 2010
Messages
197
Points
16
Location
In middle of the nothingness
Mysidian Dollar
20,995
I just found a bug... i think... dont know if im the only one with this problem, but every pet i adopt from the shop uses the alternate image.

the pets from 1 to 17 where adopted in the shop, all of them are missing the null in the imageurl and say yes in the usesalternate. after i removed the adopt from the shop the pets from 18 to 22 have the null in the imageurl and some say no and yes in the usealternate...

and again im not a coder so i cant find how to fix it, and i really hope some one can help me, because most of my adopts use the alternate image and most of them are going to the adoptshop.

Im using the latest version of the script.
 

Attachments

  • myshop.jpg
    myshop.jpg
    19.3 KB · Views: 10
umm this is interesting, I wasnt able to reproduce the problem when I was betatesting Mys v1.3.4. Anyone else have this issue too? Lemme know and I will investigate further.
 
i would be happy if you could help me HoF because I already re-uploaded all the pages, that use the adoptshop, thinking that maybe i made a wrong edit, but the problem is still there. and is only in the adoptshop, in the adopt, page and even using the breeding the alts work fine, the only edit i made was adding a image to the market, and changing the order of the shops so now the adoptshop is first and then the itemshop but the problem was there before i made the edits. the only edits i made after installing the script was adding the gender mod, but i did a restore of the files thinking that maybe was the gender mod, but no, so i added again the gender mod. I also added a new function to the items. those are the only edits i have in the site.


EDIT:
just to be sure, I made a complete re-install of the script and database, the problem is still there. every adopt adopted from the shop will be an alt.
 
Last edited:
I see, I will tell Anna to try to reproduce this issue on her site and see if she can do it. In this way I will be sure this is affecting more than one site and is likely to be a glitch to be fixed.
 
the problem with the shop always selling alts continue, and now i found another "glitch" with the Alts1 item functions... is transforming every adopt in to his alt image... the problem is: that it also changes those that dont have the alternate images enabled, and end up with some "x" instead of the image of the adopts.
 
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:
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:
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
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,130
Members
1,603
Latest member
Monako
BETA

Latest Threads

Latest Posts

Top