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)

Abronsyth 08-13-2014 12:08 PM

Error When Using Item
 
Purchasing an item works fine, and it works perfectly when I go to inventory>item>use.

I can get to the select adoptable page, but after I try to actually use it, it brings me to a blank white page and doesn't work. Sorry if my explanation doesn't make sense!

So this page is fine;
http://i.imgur.com/PxBFvxr.png
But after I click "Choose This Adopt" I end up on a blank page.

Does anyone else have this issue, or know how to fix it?

Warm regards,
Abron

Hall of Famer 08-13-2014 03:30 PM

umm did you modify the item functions or the inventory.php file? If you get a white page its most likely a syntax error.

Abronsyth 08-13-2014 03:34 PM

No, I have not touched it., or at least not that I recall. ((I wish PHP made more sense to me XD))
PHP Code:

<?php

class InventoryController extends AppController{

    const 
PARAM "confirm";
    private 
$view;
    private 
$subController;

    public function 
__construct(){
        
parent::__construct("member");
    }
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");
        
$document $mysidia->frame->getDocument();
        
$document->setTitle($mysidia->lang->inventory);
        
        
$inventory = new Inventory($mysidia->user);
        if(
$inventory->gettotal() == 0) throw new InvalidIDException($mysidia->lang->inventory_empty);
        
$inventory->display();
    }
            
    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 InvalidIDException("It appears that you do not have this item in your inventory.");
        
        if(
$mysidia->input->post("aid")){
            if(!
$item->checktarget($mysidia->input->post("aid")) or $mysidia->input->post("validation") != "valid"){
                
$document->setTitle($mysidia->lang->use_title);
                
$document->addLangvar($mysidia->lang->use_fail);
            }
            elseif(!
$item->randomchance()){
                
$item->remove();
                
$document->setTitle($mysidia->lang->badluck);
                
$document->addLangvar($mysidia->lang->effect);
            }
            else 
$item->apply($mysidia->input->post("aid")); 
            return;            
        }
        
        
$document->setTitle($mysidia->lang->select_title);
        
$document->addLangvar($mysidia->lang->select);
        
        
$chooseFrom = new Form("chooseform""uses""post");
        
$adoptable = new DropdownList("aid");
        
        
$ids $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}'")->fetchAll(PDO::FETCH_COLUMN);    
        
$names $mysidia->db->select("owned_adoptables", array("name"), "owner = '{$mysidia->user->username}'")->fetchAll(PDO::FETCH_COLUMN);
        
$adoptable->add(new Option("None Selected""none"));
        
$adoptable->fill($names$ids);
        
        
$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);
    }
    
    public function 
sell(){
        
$mysidia Registry::get("mysidia");
        
$document $mysidia->frame->getDocument();
        
$item = new PrivateItem($mysidia->input->post("itemname"), $mysidia->user->username);   
        if(
$item->iid == 0) throw new InvalidIDException("It appears that you do not have this item in your inventory.");
        
        if(!
$mysidia->input->post("quantity")){
            
$document->setTitle($mysidia->lang->global_action_title);
            
$document->addLangvar($mysidia->lang->sell_empty);
        }
        elseif(
$item->quantity $mysidia->input->post("quantity")){
            
$document->setTitle($mysidia->lang->global_action_title);
            
$document->addLangvar($mysidia->lang->sell_quantity);
        }
        else{
            
$item->sell($mysidia->input->post("quantity"));
            
$document->setTitle("Transaction Completed");
            
$document->addLangvar("{$mysidia->lang->sell}{$mysidia->input->post("quantity")} {$mysidia->input->post("itemname")} {$mysidia->lang->sell2}");
        }    
    }
    
    public function 
toss(){
        
$mysidia Registry::get("mysidia");
        
$document $mysidia->frame->getDocument();
        
$item = new PrivateItem($mysidia->input->post("itemname"), $mysidia->user->username);  
        if(
$item->iid == 0) throw new InvalidIDException("It appears that you do not have this item in your inventory.");
        
        if(
$mysidia->input->get("confirm")){
            
$item->toss();
            
$document->setTitle($mysidia->lang->global_action_complete);
            
$document->addLangvar($mysidia->lang->toss.$mysidia->input->post("itemname").$mysidia->lang->toss2);
            return;
        }
        
        
$warning "Are you sure you wish to toss {$mysidia->input->post("itemname")}?<br> 
                    It will be permanently removed from your inventory, and this action cannot be undone!<br>"
;
        
$document->setTitle("Confirm your Action");
        
$document->add(new Comment($warning));    

        
$confirmForm = new FormBuilder("confirmform""toss/confirm""post");
        
$confirmForm->buildPasswordField("hidden""action""toss")
                    ->
buildPasswordField("hidden""itemname"$mysidia->input->post("itemname"))
                    ->
buildButton("Please Toss""confirm""confirm");
        
$document->add($confirmForm);            
    }
}
?>


Missy Master 08-13-2014 04:14 PM

Ugh it did this for me too, several times now!

I am really praying for an answer to this! It's gotten to where I can't use ANY items now, once it does it to one .. plus, if I go in as a diff user? Then it works ok!

Missy Master 08-13-2014 04:22 PM

Okay this is a huge problem now for me, if we cant figure it out Im going to have to take Simmland offline.

Just had it happen again and it locks up all use of ALL items, once it happens.

Go in under another name, and it's fine. So it cant be the ip ...

Hall of Famer 08-13-2014 05:10 PM

I see, sounds serious. If anyone of you dont mind giving me ftp access to your server Id love to test something and see where the error is. Send me a PM of the information if you want to.

Missy Master 08-13-2014 07:07 PM

Messaged you :)

Hwona 08-13-2014 07:43 PM

Oh dear - is this affecting both v.1.3.3 and v.1.3.4?

Missy Master 08-13-2014 09:24 PM

As far as I know, just .4.

But wow, its really bad and I have looked through everything and cannot find a trigger for it at ALL.

Abronsyth 08-13-2014 09:54 PM

I am running 1.3.3 and having this issue. I can't remember if I've had it happen before, or not.


All times are GMT -5. The time now is 03:37 PM.

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