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)
-   -   Item Function Is Invalid (http://www.mysidiaadoptables.com/forum/showthread.php?t=4209)

Hwona 08-02-2013 03:17 PM

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...

Hwona 08-05-2013 12:14 PM

Yeah, I think I messed up again - it keeps displaying the "Your adopt is already female" message regardless of gender....

IntoRain 08-05-2013 03:21 PM

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

Hwona 08-06-2013 11:14 PM

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?

Hall of Famer 08-18-2013 02:33 AM

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.

Hwona 08-18-2013 11:18 AM

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

Hall of Famer 08-18-2013 02:22 PM

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.

Hwona 08-18-2013 06:48 PM

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...

Hall of Famer 08-19-2013 01:13 AM

I see, mind posting the actual source code of your item function here?

Hwona 08-19-2013 07:41 AM

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*


All times are GMT -5. The time now is 11:59 PM.

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