|
#1
|
||||
|
||||
Item Function Is Invalid
Hello, I was thinking about trying to make a new item function, but whenever I try to use an item, it says the item function is invalid. Can someone help or point me in the right direction? :3
Yes, I created a new row in adopts_items_functions. Here's the code: PHP Code:
Last edited by Hwona; 07-23-2013 at 10:29 AM. |
#2
|
||||
|
||||
Are you sure the function name matches the naming convention? Take a screenshot from PHPMyadmin and I will see how to help you.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#3
|
||||
|
||||
Re
Last edited by Hwona; 07-23-2013 at 03:55 PM. |
#4
|
||||
|
||||
Well there is indeed an error in your code. This line clearly is not doing the right thing, you aint using the database class properly.
PHP Code:
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#5
|
||||
|
||||
Re
Ah thanks! Now if only I knew exactly how to fix it...
From the looks of it, I think I might have to add something like: ... ownedadopt ->... and so on.. But then, another half of me thinks it's suppossed to be something like getgender. :L Do you mind telling me what I need to tweak. PHP Code:
Last edited by Hwona; 07-23-2013 at 04:38 PM. |
#6
|
||||
|
||||
Well its still incorrect, the syntax should be:
PHP Code:
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#7
|
||||
|
||||
Re
:D thank you so much! So you have to put all that aid stuff there? :3
O.o but it still says the function is invalid. Is there any other problem with the code? Last edited by Hwona; 07-24-2013 at 11:15 AM. |
#8
|
||||
|
||||
Yeah there is still one more trick you need to apply at least with Mys v1.3.3. Go to the script file class_privateitem.php, find the long switch statement that defines each item function, add yours in the list, and it should be working. In Mys v1.3.4 that will be released in about a week or two, I will make it possible to get the item function name dynamically so you wont have to go through this pain.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#9
|
||||
|
||||
:D Thanks!
- Oh, now it says that the registery doesn't exist. O.o Last edited by Hwona; 07-30-2013 at 06:55 PM. |
#10
|
||||
|
||||
Clearly you have misspelled the word registry.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with a item function | kristhasirah | Questions and Supports | 35 | 04-03-2017 11:17 AM |
Mys v1.3.4 Item Function: Gender Change Potion | Kyttias | Mys v1.3.x Mods | 21 | 10-12-2016 08:52 PM |
Calling a function in a function from the same class page | Hwona | Questions and Supports | 2 | 04-25-2015 09:41 AM |
Item Function Suggestions | NobodysHero | Suggestions and Feature Requests | 5 | 06-23-2014 04:45 AM |
What's New? |
What's Hot? |
What's Popular? |