Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Error When Using Item (http://www.mysidiaadoptables.com/forum/showthread.php?t=4628)

Missy Master 08-15-2014 11:45 AM

It never happened on Caterpillar at all .. and wow, 60 times and nothing.

I just don't get it, its baffling to me. And Abronsyth is having it happen too, so I know it isn't just my site.

I don't get it!!

Thanks for trying Wallie .. what a mystery ... hopefully HoF is having some luck.

Hwona 08-15-2014 11:52 AM

@Annatar
You said that this is only affecting the USE function???
O.o ???????

Missy Master 08-15-2014 11:53 AM

Yep!!

Isnt that weird? Toss and Sell both continue to work fine!

But Use gets the white out, once it starts!

Hwona 08-15-2014 11:58 AM

@Annatar
Wait, do you have an invetory.php file I could take a peek at?

Missy Master 08-15-2014 12:00 PM

Sure ! here you go :)


Code:

<?php

class InventoryController extends AppController{

    const PARAM = "confirm";

    public function __construct(){
        parent::__construct("member");
    }
       
        public function index(){
            $mysidia = Registry::get("mysidia");
                $inventory = new Inventory($mysidia->user);
        if($inventory->gettotal() == 0) throw new InvalidIDException("inventory_empty");
                $this->setField("inventory", $inventory);
        }
                       
        public function uses(){
                $mysidia = Registry::get("mysidia");
                $document = $mysidia->frame->getDocument();
                $item = new PrivateItem($mysidia->input->post("itemname"), $mysidia->user->username); 
        if($item->iid == 0) throw new ItemException("use_none");
               
                if($mysidia->input->post("aid")){
                    if(!$item->checktarget($mysidia->input->post("aid")) or $mysidia->input->post("validation") != "valid"){
                            throw new ItemException("use_fail");
            }
                    elseif(!$item->randomchance()){
                $item->remove();
                                throw new ItemException("use_effect");
            }
            else{
                            $message = $item->apply($mysidia->input->post("aid"));
                                $this->setField("message", $message);
                        }       
            return;                       
                }

        $stmt = $mysidia->db->select("owned_adoptables", array("aid", "name"), "owner = '{$mysidia->user->username}'");
        $map = $mysidia->db->fetchMap($stmt);
                $this->setField("petMap", $map);
        }
       
        public function sell(){
                $mysidia = Registry::get("mysidia");
                $item = new PrivateItem($mysidia->input->post("itemname"), $mysidia->user->username); 
        if($item->iid == 0) throw new ItemException("sell_none");
               
        if(!$mysidia->input->post("quantity")) throw new ItemException("sell_empty");
        elseif($item->quantity < $mysidia->input->post("quantity")) throw new ItemException("sell_quantity");
        else $item->sell($mysidia->input->post("quantity"));
        }
       
        public function toss(){
            $mysidia = Registry::get("mysidia");
                $item = new PrivateItem($mysidia->input->post("itemname"), $mysidia->user->username); 
            if($item->iid == 0) throw new ItemException("toss_none");
               
                if($mysidia->input->get("confirm")){
                        $item->toss();
                return;
                }               
        }
       
        public function alchemy(){
            $mysidia = Registry::get("mysidia");
                $settings = new AlchemySetting($mysidia->db);
                if($settings->system == "disabled") throw new ItemException("alchemy_disabled");
               
                if($mysidia->input->post("iid") and $mysidia->input->post("iid2")){
                    $alchemy = new Alchemy($mysidia->input->post("iid"), $mysidia->input->post("iid2"), $settings);
                        $alchemy->mix();
                        $this->setField("alchemy", $alchemy);
            return;
                }
               
                $stmt = $mysidia->db->select("inventory", array("iid", "itemname"), "owner = '{$mysidia->user->username}'");
                $map = $mysidia->db->fetchMap($stmt);
                $this->setField("itemMap", $map);
                $this->setField("settings", $settings);
        }
}
?>


Hwona 08-15-2014 12:07 PM

@Annatar
Of course there are some differences because of our versions, but there may just be something in there... I checked, but I couldn't catch anything that really stood out... maybe you're sharper?

Missy Master 08-15-2014 12:11 PM

I've looked and looked and looked, for days now .. the only thing i can think is its something to do with the adding clicks or leveling or something, getting to a point it just cuts off the 'Use' function for ALL items suddenly.


HoF is going to have to cure this I think, lol, I am stumped, totally now.

Hall of Famer 08-15-2014 12:31 PM

So if it affects an account it will not be able to use items anymore? I think I am starting to understand this a bit, I cant describe it yet but it will help me better if anyone of you provide me link to your control panel. If I can access your database in phpmyadmin and take a look there. There may be some corrupted data that I can fix for you and your account can be used again. But of course, I still need to find where the corrupted data is generated then, but that can be done later.

Missy Master 08-15-2014 12:39 PM

Sent you a PM !

Hall of Famer 08-15-2014 04:06 PM

I've found the solution to this glitch now, it has something to do with a single line in script file classes/resource/collection/class_linkedhashmap.php. Someone already pointed it out before, but it was back in January so its after Mys v1.3.4 was released. This error will go away in Mys v1.4.0 completely:
http://mysidiaadoptables.com/forum/p...php?issueid=37

To fix this issue, find this line:

PHP Code:

for($entry $this->header->getAfter(); $entry != $this->header$entry $entry->getAfter()){ 

Change it to:

PHP Code:

for($entry $this->header->getAfter(); $entry !== $this->header$entry $entry->getAfter()){ 

It basically changes != into !==, and everything will work like a charm. ^^


All times are GMT -5. The time now is 06:42 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.