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-13-2014 10:03 PM

Ah, thats a shame then! When it happens, I look at the user tables, everything, nothing has altered at all I can see, but it's just that user it happens to, for the moment. No idea why it happens, no idea how to undo it, but a few people had brought it to my attention and now it's happening to me too .. and it's so bad I might have to shut down totally.

No use of the toys or pets or any of that really screws up the whole site :(

Missy Master 08-14-2014 02:55 PM

Okay, finally got it to happen on the secondary account ( miloe ) -- I used item after item and it was great, then I went and bought a few new pets --- got them fine --- then went back and tried to add an item and BAM!

White screen! http://sim-life.com/Simmland/inventory/uses

Hall of Famer 08-14-2014 03:01 PM

umm do you find any patterns in this? Does this tend to happen to certain adoptables of yours or when you use certain items?

Missy Master 08-14-2014 03:06 PM

No pattern so far, and I've been looking --- can be any pet, any species, any item. And I was wondering if it had something to do with the level of the pet or something, but then I realized, this happens - the white screen - at a point where you aren't even able to choose a pet yet, at least for me it does.

But just to be sure, i just applied items to level 0's and level 3's just fine.

On my third account, my test, since I cant use the others now.


Out of nowhere, you click use on something, and white screen.

Abronsyth 08-14-2014 03:09 PM

For me it happens with either of the adoptables (only two exist right now on my site). I will try adding a new item and testing it out with that item.

If you need my FTP info just ask!

Missy Master 08-14-2014 03:17 PM

I strongly suspect a bug located in inventory.php or something to do with it, but I could be wrong!

Missy Master 08-14-2014 05:56 PM

If this helps ??

Going to Toss or Sell both DO still work, on all items!

It's just 'Use' that gets the white out!

I think its in function uses, but I just cant find it ..............

Hwona 08-14-2014 06:10 PM

Quote:

Originally Posted by Annatar (Post 30950)
If this helps ??

Going to Toss or Sell both DO still work, on all items!

It's just 'Use' that gets the white out!

I think its in function uses, but I just cant find it ..............

If you have an inventory.php file in v.1.3.4, I THINK it's the first function that shows up...
umm, you said you're getting a blank screen? Doesn't that usually mean syntax error or something similar? O.o
Did this work before?

Missy Master 08-14-2014 06:12 PM

Yeah it's on there as inventory.php ...

the thing is, it works for a while, then it suddenly stops, and you get white out on all items, from then on, on that account, to 'use ' them --- sign in under a diff name, and you are good to go.

It's really affecting things on my site, I didn't realize it was this bad. I'm looking at the function code to try to see whats wrong...

Missy Master 08-14-2014 06:15 PM

This is inventoryview.php 'use' code:


Code:

               
        public function uses(){
                $mysidia = Registry::get("mysidia");
                $document = $this->document;       
                if($mysidia->input->post("aid")){
                    $message = (string)$this->getField("message");
                    $document->setTitle($mysidia->lang->global_action_complete);
            $document->addLangvar($message);
            return;               
                }
               
                $petMap = $this->getField("petMap");
                $document->setTitle($mysidia->lang->select_title);
        $document->addLangvar($mysidia->lang->select);               
                $chooseFrom = new Form("chooseform", "uses", "post");
               
                $adoptable = new DropdownList("aid");
                $adoptable->add(new Option("None Selected", "none"));
        if($petMap->size() > 0){
            $iterator = $petMap->iterator();
            while($iterator->hasNext()){
                $adopt = $iterator->nextEntry();
                $adoptable->add(new Option($adopt->getValue(), $adopt->getKey()));
            }
        }               
                $chooseFrom->add($adoptable);
               
                $chooseFrom->add(new PasswordField("hidden", "itemname", $mysidia->input->post("itemname")));
                $chooseFrom->add(new PasswordField("hidden", "validation", "valid"));
                $chooseFrom->add(new Button("Choose this Adopt", "submit", "submit"));
        $document->add($chooseFrom);
        }


and

from inventory.php

Code:


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);
        }



All times are GMT -5. The time now is 03:42 AM.

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