Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-11-2012, 04:25 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 618,620
Hall of Famer is on a distinguished road
Default

I see, thanks for bringing this up. The problem is that the method checktarget() accepts the owned_adoptables id, not the adoptables species id. For this reason it is working out in somewhat of a weird way. To fix this, find these lines in class_item.php:

PHP Code:
  public function checktarget($aid){
      
// This method checks if the item is usable
      
$item_usable FALSE;
      switch(
$this->target){
         case 
"all":
            
$item_usable TRUE;
            break;
         case 
"user":
            
$item_usable TRUE;
            break;
         default:
            
$target explode(",",$this->target);
            foreach(
$target as $temp){
               if(
$temp == $aid$item_usable TRUE
            }            
      }
      return 
$item_usable;
  } 
Replace by:

PHP Code:
public function checktarget($aid){
      
// This method checks if the item is usable
      
$id converttypetoparentid(convertidtotype($aid));
      
$item_usable FALSE;
      switch(
$this->target){
         case 
"all":
            
$item_usable TRUE;
            break;
         case 
"user":
            
$item_usable TRUE;
            break;
         default:
            
$target explode(",",$this->target);
            if(
in_array($id$target)) $item_usable TRUE;            
      }
      return 
$item_usable;
  } 
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mys 1.3.4 - Items for certain currentlevel draugluin Questions and Supports 2 04-23-2015 03:26 AM
problem with using items Phoeniix Questions and Supports 3 11-02-2013 07:54 PM
Items not working kristhasirah Questions and Supports 1 09-09-2013 10:05 PM
Sell Items not working SilverDragonTears Questions and Supports 2 04-14-2012 10:38 AM
Certain Items Won't Be Added? AlexC Questions and Supports 4 03-27-2012 03:22 PM


All times are GMT -5. The time now is 09:38 AM.

Currently Active Users: 3861 (0 members and 3861 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636