18.04.2010, 16:25
This is my problem...When i try to fetch all the data for my player account, the Username and pass print correctly however the numbers are wrong.. this is my code:
It should say this on the console:
Although it says this instead:
so, as u can see its the numbers that are not working.. (they are type 'int' on the Database...the text based ones are 'varchar')
Код:
//----------==========Load accoutn info==========---------- mysql_fetch_field("ID",PlayerStats[playerid][pId]); mysql_fetch_field("user",PlayerStats[playerid][pUser]); mysql_fetch_field("pass",PlayerStats[playerid][pPass]); mysql_fetch_field("admin", PlayerStats[playerid][pAdmin]); printf("ID:%i,User:%s,Pass:%s,Admin:%i",PlayerStats[playerid][pId],PlayerStats[playerid][pUser],PlayerStats[playerid][pPass],PlayerStats[playerid][pAdmin]);
Код:
ID:2,User:HighDarren,Pass:test,Admin:0
Код:
ID:50,User:HighDarren,Pass:test,Admin:48