![]() |
|
#1
|
||||
|
||||
![]()
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 .............. Last edited by Missy Master; 08-14-2014 at 06:00 PM. |
#2
|
||||
|
||||
![]() Quote:
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? |
#3
|
||||
|
||||
![]()
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... |
#4
|
||||
|
||||
![]()
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); } |
![]() |
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? |