MySql question
#1

Well these is most confusing part for me...

I have saved in mysql users debase next info

User
Password
IP
Level
Kills
Deaths
Money

and i have
pawn Код:
enum pInfo
{
    IP,
    Level,
    Kills,
    Deaths,
    Money
}
So when i must log him in i fetch row and comes confusing part

pawn Код:
while(mysql_fetch_row_format(iQuery,"|"))
{
    sscanf(iQuery,"e<p<|>s[24]s[24]s[34]dddd>",AccInfo[playerid]);
}
I KNOW THAT THESE WILL NOW WORK
So how i can set player variables but not waste 82 cells?

The only way i know that these will work is:

pawn Код:
while(mysql_fetch_row_format(iQuery,"|"))
{
    new tmp1[3][82];
    new tmp2[4];
    sscanf(iQuery,"e<p<|>s[24]s[24]s[34]dddd>",tmp1[0],tmp1[1],tmp1[2],tmp2[0],tmp2[1],tmp2[2],tmp2[3]);
    AccInfo[playerid][Level] = tmp2[0];
    //And continue...
}
Is it possible to optimize these crap or im fucked up?
Reply
#2

Try to see if this code works:
pawn Код:
sscanf(iQuery,"e<p<|>{s}{s}s[34]dddd>",AccInfo[playerid]);
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)