09.05.2013, 16:47
I got a normal format here. Nothing special:
Getting players name and ip with these functions:
It works well but sometimes either format or one of the function fails and that's whats going to print in the mysql log:
So where is the problem? It only happens by certain querys.
Код:
new query[150]; format(query, sizeof(query), "UPDATE `accounts` SET `Logged` = 1, `IP` = '%s' WHERE `Name` = '%s'", __GetIP(playerid), __GetName(playerid));
Код:
__GetName(playerid)
{
new name[25];
GetPlayerName(playerid, name, 25);
return name;
}
__GetIP(playerid)
{
new IP[16];
GetPlayerIp(playerid, IP, 16);
return IP;
}
Quote:
|
UPDATE `accounts` SET `Logged` = 1, `IP` = '' WHERE `Name` = '' |




