07.08.2010, 18:39
(
Последний раз редактировалось ihatetn931; 08.08.2010 в 09:29.
Причина: Got it solved
)
Ok, I have a issue with ips saving to a mysql database.
To get the player ip //This is at the top of my Saveaccount by all the other strings
My save account the part where it saves the ip, Public SaveAccount(playerid);
When it goes to save to the data base it dosen't print the ip in the database it just shows a blank spot where the ip should be
Mysql Table Info
Top of my Saveaccount just incase it's needed
Does anyone have any idea why it's printing out a blank instead of the ip?
To get the player ip //This is at the top of my Saveaccount by all the other strings
pawn Код:
new playerip[16];
GetPlayerIp(playerid, playerip, sizeof(playerip));
pawn Код:
format(string, sizeof(string), "UPDATE `players` SET `Carkey1` = '%d', `Carkey2` = '%d', `Carkey3` = '%d' , `Ip` = '%s' WHERE `id` = '%d'",PlayerInfo[playerid][pPcarkey], PlayerInfo[playerid][pPcarkey2],PlayerInfo[playerid][pPcarkey3],PlayerInfo[playerid][pID],playerip);
mysql_query(string);
Mysql Table Info
Код:
Field Type Collation Null Default Extra Ip varchar(16) latin1_swedish_ci No None
pawn Код:
forward SaveAccount(playerid);
public SaveAccount(playerid)
{
new playerip[16];
GetPlayerIp(playerid, playerip, sizeof(playerip));
new string[255];
if(PLogged[playerid] == 1)
{