01.12.2012, 03:26
Exemplo para fazer um Debug
Procure pela stock Login e coloque os print se algum falhar vc encontrara o bug!
Procure pela stock Login e coloque os print se algum falhar vc encontrara o bug!
pawn Код:
stock Login(playerid)
{
print("0000000000000");
new query[128], string[64], money, score;
format(query, sizeof(query), "SELECT * FROM accounts WHERE user = '%s'", Name(playerid));
print("11111111111");
mysql_query(query);
print("2222222222222222");
mysql_store_result();
print("33333333333333333");
while(mysql_fetch_row_format(query))
{
mysql_fetch_field_row(string, "admin"); PlayerInfo[playerid][pAdmin] = strval(string);
print("4444444444444");
mysql_fetch_field_row(string, "VIP"); PlayerInfo[playerid][pVIP] = strval(string);
print("55555555555555");
mysql_fetch_field_row(string, "warnings"); PlayerInfo[playerid][pWarnings] = strval(string);
print("6666666666666");
mysql_fetch_field_row(string, "score"); score = strval(string);
print("77777777777777777");
mysql_fetch_field_row(string, "money"); money = strval(string);
print("8888888888888");
mysql_fetch_field_row(string, "kills"); PlayerInfo[playerid][pKills] = strval(string);
print("999999999999999");
mysql_fetch_field_row(string, "deaths"); PlayerInfo[playerid][pDeaths] = strval(string);
print("aaaaaaaaaaaaaaaaaa");
mysql_fetch_field_row(string, "points"); PlayerInfo[playerid][pPoints] = strval(string);
}
print("bbbbbbbbbbbbbbbbb");
mysql_free_result();
GivePlayerMoney(playerid, money);
print("ccccccccccccc");
SetPlayerScore(playerid, score);
print("dddddddddddddddddd");
PlayerInfo[playerid][pLogged] = 1;
print("eeeeeeeeeeee");
UpdateStatsTextdraw(playerid);
print("ffffffffffffff");
SendClientMessage(playerid, C_LGREEN, "ACCOUNT: Successfully logged in.");
print("ggggggggggggggggggggg");
return 1;
}