28.07.2012, 16:04
Hello can someone tell me why
This code wont work i think everything is ok
They are all Int in mysql and they have lenght 1 they are 1 or 0
when i print them it says (null)
pawn Код:
new Query[256],pName[MAX_PLAYER_NAME],Lang[3],Admin[3],VIP[3];
GetPlayerName(playerid,pName,24);
format(Query,sizeof(Query),"SELECT * FROM `users_drift` WHERE username = '%s' LIMIT 1",pName);
mysql_query(Query);
mysql_store_result();
mysql_retrieve_row();
mysql_get_field("Lang",Lang);
mysql_get_field("Admin",Admin);
mysql_get_field("VIP",VIP);
if(mysql_num_rows() == 1){
player_Language[playerid] = strval(Lang);
player_Admin[playerid] = strval(Admin);
player_VIP[playerid] = strval(VIP);
print(player_Language[playerid]);
print(player_Admin[playerid]);
print(player_VIP[playerid]);
They are all Int in mysql and they have lenght 1 they are 1 or 0
when i print them it says (null)