problem with ip address.
#1

Hi all.Now i have problem with my ip address.The problem is here:

Код:
new pFiles[ 40 ];
if(dialogid == 0)
{
if(response)
{
format(pFiles, sizeof(pFiles), "saves/user/%s.ini", PlayerName(playerid));
dini_Create(pFiles);
new pIP[16];
GetPlayerIp(playerid, pIP, sizeof(pIP));
dini_Set(pFiles, "IP address", pIP);
}
return 1;
}
Here when player register,then he get ip save,but ip don't save in player files:

Код:
IP address=(and here is nothing,no ip address.)
Reply
#2

pIP is to small!
Reply
#3

Quote:
Originally Posted by budelis
Посмотреть сообщение
Hi all.Now i have problem with my ip address.The problem is here:

pawn Код:
new pFiles[ 40 ];
if(dialogid == 0)
{
if(response)
{
format(pFiles, sizeof(pFiles), "saves/user/%s.ini", PlayerName(playerid));
dini_Create(pFiles);
new pIP[16];
GetPlayerIp(playerid, pIP, sizeof(pIP));
dini_Set(pFiles, "IP address", pIP);
}
return 1;
}
Here when player register,then he get ip save,but ip don't save in player files:

Код:
IP address=(and here is nothing,no ip address.)
250.250.250.250
123.456.789.123
13+3(dots) = 16 (its not too small..)

try : dini_IntSet(pFiles, "IP address", pIP);
(i dont have so big knowladge in dini..)

if it will not work too,than try :
pawn Код:
new pFiles[ 40 ];
if(dialogid == 0)
{
if(response)
{
new pIP[16];
GetPlayerIp(playerid, pIP, sizeof(pIP));
format(pFiles, sizeof(pFiles), "saves/user/%s.ini", PlayerName(playerid));
dini_Create(pFiles);
dini_IntSet(pFiles, "IP address", pIP);
}
return 1;
}
or:
pawn Код:
new pFiles[ 40 ];
if(dialogid == 0)
{
if(response)
{
new pIP[16];
GetPlayerIp(playerid, pIP, sizeof(pIP));
format(pFiles, sizeof(pFiles), "saves/user/%s.ini", PlayerName(playerid));
dini_Create(pFiles);
dini_Set(pFiles, "IP address", pIP);
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)