format fail?
#1

I got a normal format here. Nothing special:
Код:
    
new query[150];
format(query, sizeof(query), "UPDATE `accounts` SET `Logged` = 1, `IP` = '%s' WHERE `Name` = '%s'", __GetIP(playerid), __GetName(playerid));
Getting players name and ip with these functions:

Код:
__GetName(playerid)
{
    new name[25];
    GetPlayerName(playerid, name, 25);
    return name;
}

__GetIP(playerid)
{
	new IP[16];
	GetPlayerIp(playerid, IP, 16);
	return IP;
}
It works well but sometimes either format or one of the function fails and that's whats going to print in the mysql log:
Quote:

UPDATE `accounts` SET `Logged` = 1, `IP` = '' WHERE `Name` = ''

So where is the problem? It only happens by certain querys.
Reply


Messages In This Thread
format fail? - by Mellnik - 09.05.2013, 16:47
Re: format fail? - by DaRk_RaiN - 09.05.2013, 16:51
AW: format fail? - by Mellnik - 09.05.2013, 16:57
Re: format fail? - by BlackBank - 09.05.2013, 17:01
Re: format fail? - by park4bmx - 09.05.2013, 17:02
Re: format fail? - by Vince - 09.05.2013, 17:30
Re: format fail? - by Kwarde - 09.05.2013, 17:37
AW: format fail? - by Mellnik - 09.05.2013, 18:15
Re: format fail? - by Kwarde - 09.05.2013, 18:33
Re: format fail? - by park4bmx - 09.05.2013, 19:28

Forum Jump:


Users browsing this thread: 4 Guest(s)