16.09.2010, 13:50
See, this is my full code:
If i change the PlayerInfo[playerid] to new var[pInfo]; its just stuck there, and its not continue with the loading.
what can be the problem ?
pawn Код:
public LoadMYSQL(playerid, password[])
{
new sscanfinput[64], string[256];
new name[24],
Escape[2][128];
GetPlayerName(playerid, name, 50);
mysql_real_escape_string(name, Escape[0]); // This function makes sure you don't get MySQL injected. Read about it by searching it on ******.
mysql_real_escape_string(sscanfinput, Escape[1]);
//format(string, 128, "SELECT * FROM `playerinfo` WHERE `user` = '%s' AND `password` = '%s'", name, password);
format(string, sizeof(string), "SELECT * FROM `playerinfo` WHERE `user` = '%s' AND `password` = '%s'", name, password);
mysql_query(string);
mysql_store_result();
SendClientMessage(playerid, COLOR_PURPLE, "You're logged in.");
new row[2048];
sscanf(row, "p<|>e<s[128]s[128]iiiiiiiiiiiis[128]iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiis[128]s[128]s[128]s[128]s[128]iffffiffffiffffiiffffffffifffffffffffffffiiis[128]s[128]s[128]s[128]s[128]ffffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiis[128]>", PlayerInfo[playerid]);
mysql_store_result();
mysql_free_result();
gPlayerLogged[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "Account loaded.");
return 1;
}
what can be the problem ?