Allright then
I took a look at your code (i assumed "Nothin was added" was the message you got as you said in your first post), and i only found 3 possibilities, and two of them have the same source. Either:
or:
return false.
Both will be caused when the following vars have the wrong values. If you would check these, i think you will find out why you get this message.
The third possible cause might be this query:
if you have an error in it, normally you would get "
Error: mysql_num_rows result is not a valid resource" or something similar. But if it returns 0, $count2++ will not be incremented, and you might get the "Nothin added" message
as it is very difficult for us to understand what you're doing (i think you'r building a game right? ), it's hard to give detailed debugging information and sollutions (understanding this entire code requires an hour or 2).
I recommend you to rewrite this entire code: i might be wrong, but i think you can clean this code up a bit, so it's easier to understand for both of us
Anyway: have fun building your game (i'm working on a game myself for 3 years now). If you still can't figure it out, you will have to give more information about what the code does, and what's in those variables i posted above.
UnrealEd