![]() |
|
#1
|
||||
|
||||
![]()
Yep I think so :)
|
#2
|
||||
|
||||
![]()
I have an account on your site now, I've purchased some items and I will adopt a few pets too. With this, I will try to reproduce the same white screen as you've encountered. I am sure theres a way to find out, I will let you know once I figure out. ^^
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#3
|
||||
|
||||
![]()
Great!!
It took me ten times on one account and 20 on another to get it to happen, but once it did, there was no going back. Most of the members cant use items it seems now ... |
#4
|
||||
|
||||
![]()
@Annatar
Wait... do you think it's a problem with the database? |
#5
|
||||
|
||||
![]()
Well, I really cant tell, because I've looked at everything after this happens, and right before, too, noted what all the user, item, inventory, banning, all those tables for all that, and I can't find one thing different in anything.
But it's likely some obscure value that gets inserted, or possibly there is a 'cut off' ?? Of how many items can be used? It might possibly be something in where the amount of clicks and leveling gets cut off, there's something that seems to reach a cut off and then you error out and white out. Syntax is bad for it or something, but once you reach this critical point, you get no more chances then lol. And bingo make a new account and log in, and you're right as rain. Can't be ip based. |
#6
|
||||
|
||||
![]()
@Annatar
I tried over 30 times on my test site... Nothing. Everything works. What browser are you all using and how many items, pets, and users do you have? |
#7
|
||||
|
||||
![]()
I know it isn't just me since others are having it happen on their sites, and once it happens, it doesn't matter what browser or anything, I have used Chrome, FF and IE.
Happens on all of them :( I have about 20 users, 15 items, 10 pet species. Try making an account on Simmland and see if it happens? I had to do it 15 times but it did happen again, and then 20 times later on a second account. |
#8
|
||||
|
||||
![]() Quote:
|
#9
|
||||
|
||||
![]()
In class_ownedadoptable, you can see where the items are designated.
The only reason I can think for an item -- any item-- to work and work and then cut off, is that some barrier is being reached. Code:
<?php class OwnedAdoptable extends Adoptable{ protected $aid; protected $name; protected $owner; protected $currentlevel; protected $totalclicks; protected $code; protected $imageurl; protected $usealternates; protected $tradestatus; protected $isfrozen; protected $gender; protected $offsprings; protected $lastbred; protected $nextlevel; protected $voters; protected $statname; protected $mother; protected $father; protected $toy_1; protected $toy_2; protected $toy_3; protected $toy_4; protected $toy_5; protected $unique; protected $adoptablepersonality; public function __construct($aid, $owner = ""){ $mysidia = Registry::get("mysidia"); $whereClause = "aid ='{$aid}'"; if(!empty($owner)) $whereClause .= " and owner = '{$owner}'"; $row = $mysidia->db->select("owned_adoptables", array(), $whereClause)->fetchObject(); if(!is_object($row)) throw new AdoptNotfoundException("Pet{$adoptinfo} does not exist or does not belong to the owner specified..."); parent::__construct($row->type); foreach($row as $key => $val){ $this->$key = $val; } } public function getAdoptID(){ return $this->aid; } public function getName(){ return $this->name; } public function getAdoptstatname(){ return $this->statname; } public function getAdoptPersonality(){ return $this->personality; } public function setName($name, $assignMode = ""){ if($assignMode == Model::UPDATE) $this->save("name", $name); $this->name = $name; } public function getOwner($fetchMode = ""){ if($fetchMode == Model::MODEL) return new Member($this->owner); else return $this->owner; } public function setOwner($owner, $assignMode = ""){ if($assignMode == Model::UPDATE) $this->save("owner", $owner); $this->owner = $owner; } public function getCurrentLevel($fetchMode = ""){ if($fetchMode == Model::MODEL) return new AdoptLevel($this->type, $this->currentlevel); else return $this->currentlevel; } public function setCurrentLevel($level, $assignMode = ""){ if($assignMode == Model::UPDATE){ $this->save("currentlevel", $level); if($this->getAltStatus() == "yes") $this->save("usealternates", "yes"); } $this->currentlevel = $level; } public function getTotalClicks(){ return $this->totalclicks; } public function setTotalClicks($clicks, $assignMode = ""){ if($assignMode == Model::UPDATE) $this->save("totalclicks", $clicks); $this->totalclicks = $clicks; } public function getCode(){ return $this->code; } public function getImageURL($fetchMode = ""){ if($fetchMode == Model::GUI) return new Image($this->imageurl); else return $this->imageurl; } public function useAlternates(){ return $this->usealternates; } public function getTradeStatus(){ return $this->tradestatus; } public function getUnique(){ return $this->unique; } public function getMother(){ return $this->mother; } public function getFather(){ return $this->father; } public function getToy_1(){ return $this->toy_1; } public function getToy_2(){ return $this->toy_2; } public function getToy_3(){ return $this->toy_3; } public function getToy_4(){ return $this->toy_4; } public function getToy_5(){ return $this->toy_5; } public function setTradeStatus($status, $assignMode = ""){ if($assignMode == Model::UPDATE) $this->save("tradestatus", $status); $this->tradestatus = $status; } public function isFrozen(){ return $this->isfrozen; } public function setFrozen($frozen = TRUE, $assignMode = ""){ if($assignMode == Model::UPDATE) $this->save("isfrozen", $frozen); $this->isfrozen = $frozen; } public function getGender($fetchMode = ""){ if($fetchMode == Model::GUI) return new Image("picuploads/{$this->gender}.png"); else return $this->gender; } public function getOffsprings(){ return $this->offsprings; } public function setOffsprings($offsprings = 1, $assignMode = ""){ $this->offsprings = $offsprings; if($assignMode == Model::UPDATE) $this->save("offsprings", $this->offsprings); } public function getLastBred($fetchMode = ""){ if($fetchMode == Model::OBJ) return new DateTime($this->lastbred); return $this->lastbred; } public function setLastBred($lastBred = 0, $assignMode = ""){ if($assignMode == Model::UPDATE) $this->save("lastbred", $lastBred); $this->lastbred = $lastBred; } public function getAltStatus(){ if($this->alternates == "enabled" and $this->currentlevel == $this->altoutlevel){ $rand = mt_rand(1, $this->altchance); if($rand == 1) return "yes"; } return "no"; } public function getImage($fetchMode = ""){ if($this->imageurl and $this->currentlevel >= 3) return $this->getImageUrl($fetchMode); if($this->currentlevel == 0) return $this->getEggImage($fetchMode); $mysidia = Registry::get("mysidia"); $level = $this->getCurrentLevel("model"); if($this->useAlternates() == "yes") return $level->getAlternateImage($fetchMode); else return $level->getPrimaryImage($fetchMode); } public function hasNextLevel(){ try{ $this->nextlevel = new AdoptLevel($this->type, $this->currentlevel + 1); return TRUE; } catch(LevelNotfoundException $lne){ return FALSE; } } public function getNextLevel(){ if(!$this->nextlevel) return FALSE; return $this->nextlevel; } public function getLevelupClicks(){ if(!$this->nextlevel) return FALSE; return $this->nextlevel->getRequiredClicks() - $this->totalclicks; } public function getStats(){ $mysidia = Registry::get("mysidia"); $document = $mysidia->frame->getDocument(); $stats = new Division("adoptstats"); $stats->add(new Image("picuploads/{$this->toy_1}.png")); $stats->add(new Image("picuploads/{$this->toy_2}.png"));; $stats->add(new Image("picuploads/{$this->toy_3}.png"));; $stats->add(new Image("picuploads/{$this->toy_4}.png"));; $stats->add(new Image("picuploads/{$this->toy_5}.gif"));; $stats->add(new Comment("<br><br><b>Total Boosts: {$this->totalclicks}")); if($this->hasNextLevel()){ $level = $this->getNextLevel(); $levelupClicks = $this->getLevelupClicks(); $nextLevel = $level->getLevel().$mysidia->lang->clicks.$levelupClicks; } else $nextLevel = $mysidia->lang->maximum; $stats->add(new Comment("Gender: ", FALSE)); $stats->add(new Image("picuploads/{$this->gender}.png")); $adoptStats = "<br>Trade Status: {$this->tradestatus}<br> Father: {$this->father}<br> Mother: {$this->mother}<br> Value: {$this->statname}<br> Unique: {$this->unique}<br> Current Status: {$this->currentlevel}<br>Next Status: {$nextLevel}</b>"; $stats->add(new Comment($adoptStats)); return $stats; } public function hasVoter($user, $date = ""){ if(!$date) $date = new DateTime; $mysidia = Registry::get("mysidia"); if($user instanceof Member){ $whereClause = "adoptableid='{$this->aid}' and username = '{$user->username}' and date = '{$date->format('Y-m-d')}'"; } else{ $ip = secure($_SERVER['REMOTE_ADDR']); $whereClause = "adoptableid='{$mysidia->input->get("aid")}' and ip = '{$ip}' and date = '{$date->format('Y-m-d')}'"; } $void = $mysidia->db->select("vote_voters", array("void"), $whereClause)->fetchColumn(); if(is_numeric($void)) return TRUE; else return FALSE; } protected function save($field, $value){ $mysidia = Registry::get("mysidia"); $mysidia->db->update("owned_adoptables", array($field => $value), "aid='{$this->aid}'"); } } ?> |
#10
|
||||
|
||||
![]()
I've used Mature ( kicks a baby to level 3 ), and toys.
Let me paste the codes here for the toys for you :) This is from functions_items.php, and is the basic outlay for all my add on toys. They work fine over and over, and then --- they don't. The only diff for any of these is they insert toys into different 'slots' to allow for more to be seen at a time. Possibly it's reaching a cut off from the leveling of clicks or something? But then, why am I not the only one having it happen on their site ... Code:
function items_click4($item, $adopt){ $mysidia = Registry::get("mysidia"); $newclicks = $item->value; $mysidia->db->update("owned_adoptables", array("totalclicks" => $newclicks), "aid='{$adopt->aid}'and owner='{$item->owner}'"); $mysidia->db->update("owned_adoptables", array("toy_1" => $newclicks), "aid='{$adopt->aid}'and owner='{$item->owner}'"); $note = "You added a {$item->itemname}, and the Pet has just received a {$item->value}<br>"; //Now lets check if the adoptable has reached a new level. $ownedAdopt = new OwnedAdoptable($adopt->aid); if($ownedAdopt->hasNextLevel()){ //new level exists, time to check if the total clicks have reached required minimum clicks for next level. $nextLevel = $ownedAdopt->getNextLevel(); $requiredClicks = $nextLevel->getRequiredClicks(); if($newclicks >= $requiredClicks and $requiredClicks != 0 and $requiredClicks != ""){ // We need to level this adoptable up... $mysidia->db->update("owned_adoptables", array("currentlevel" => $nextlevel), "aid ='{$adopt->aid}' and owner='{$item->owner}'"); $note .= "And it has gained a new level!"; } } //Update item quantity... $delitem = $item->remove(); return $note; } Last edited by Missy Master; 08-15-2014 at 11:06 AM. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mys v1.3.4 Item Shop Mod(s): NPC + Item Display + Tooltips | Kyttias | Mys v1.3.x Mods | 55 | 06-19-2020 11:21 AM |
Buy X of Item A to receive X of Item B | AndromedaKerova | Suggestions and Feature Requests | 0 | 11-09-2014 08:17 PM |
Using Item Error | Abronsyth | Questions and Supports | 3 | 03-29-2013 06:43 PM |
Parse error: syntax error, unexpected T_ELSE in /home/.nyles/ | Saphira | Questions and Supports | 11 | 05-26-2009 11:45 AM |
What's New? |
What's Hot? |
What's Popular? |