#11
|
||||
|
||||
x.x Poop... I'm suppossed to know how to spell registry... that's embarassing.
Edit: ok, it's working-ish. Unfortunately, it keeps saying my adopt is already female when it's male. O.o What did I do this time... Last edited by Hwona; 08-02-2013 at 03:23 PM. |
#12
|
||||
|
||||
Yeah, I think I messed up again - it keeps displaying the "Your adopt is already female" message regardless of gender....
|
#13
|
||||
|
||||
Do an output of the $gender variable to see what it's in there (if you do echo $gender it will appear at the top left of the screen, or make your variable $note equal to $gender). If $gender actually is "f" then the mistake is at the expression, if $gender is not "f" you know you are fetching gender in a wrong way. Sorry, I don't really know the syntax, but this is a simple way of searching where the mistake is
|
#14
|
||||
|
||||
Um, the gender might be "female" instead of "f"
Ok, I've tried swapping "f" with "female", but it's still not working... maybe I should try flipping the if and else? |
#15
|
||||
|
||||
Yeah give it a shot, it never hurt to try. XD Anyway if you are talking about an issue with your own code it can be confusing to other people who do not get a complete picture of what you are trying to accomplish.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#16
|
||||
|
||||
Re
*smacks forehead*
Now I feel dumb - I haven't even told anyone what I'm trying to do... technically, I'm trying to make an item class that will change your adopt's gender to female. :3 |
#17
|
||||
|
||||
I see, in this case the gender is indeed 'f' instead of 'female', but it may not be the problem. Make sure you have an adoptable object that is actually in the item function you create. Use var_dump() on $adopt to see whether it does exist, if it exists the problem may be with your update query.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#18
|
||||
|
||||
Re
So I just stick it in the functions_items code? :3
Note: I basically did the same thing as all the other function codes... but I can't figure out what's wrong... Last edited by Hwona; 08-18-2013 at 06:53 PM. |
#19
|
||||
|
||||
I see, mind posting the actual source code of your item function here?
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#20
|
||||
|
||||
Re
O.o source code? Uh oh... I made a big mess up - again.
*searches through files in hopes of finding an example of a source code* |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with a item function | kristhasirah | Questions and Supports | 35 | 04-03-2017 10:17 AM |
Mys v1.3.4 Item Function: Gender Change Potion | Kyttias | Mys v1.3.x Mods | 21 | 10-12-2016 07:52 PM |
Calling a function in a function from the same class page | Hwona | Questions and Supports | 2 | 04-25-2015 08:41 AM |
Item Function Suggestions | NobodysHero | Suggestions and Feature Requests | 5 | 06-23-2014 03:45 AM |
What's New? |
What's Hot? |
What's Popular? |