28.08.2011, 18:18
Why this code restarts server?
pawn Code:
stock GeneratePhoneNumber(playerid)
{
PVar[playerid][pNumber] = 10000 + random(89999);
do
{
PVar[playerid][pNumber] = 10000 + random(89999);
new Query[300];
format(Query, sizeof(Query), "SELECT id FROM `playerinfo` WHERE `Number` = %i LIMIT 1", PVar[playerid][pNumber]);
mysql_query(Query); //Queries
mysql_store_result();
}
while mysql_num_rows() != 0;
mysql_free_result();
return 1;
}