19.12.2018, 15:31
As part of my database I keep the last logged in IP stored, I used the following function to obtain the ip:
When the player loads in I run:
and I use the following query to save it:
Now I can't quite identify what causes the inconsistency but the saving will either;
a: save the IP just fine or
b: save the account username with the exception of the first letter? (see image)
Does anyone know what could cause such an issue and how I would resolve it?
Code:
new ip[16]; GetPlayerIp(playerid, ip, sizeof(ip)); return ip;
Code:
userInfo[playerid][pIP][0] = EOS; strcat(userInfo[playerid][pIP], GetPlayerIpEx(playerid), 16);
Code:
mysql_format(SQLHandle, queryHandler, sizeof(queryHandler), "UPDATE `users` SET \ `IP` = '%s'" WHERE `ID` = %d", userInfo[playerid][pIP], userInfo[playerid][pID]); mysql_tquery(SQLHandle, queryHandler, "OnSavePlayer", "");
a: save the IP just fine or
b: save the account username with the exception of the first letter? (see image)
Does anyone know what could cause such an issue and how I would resolve it?