Auto login - Player IP
#1

Hi, i tried to make an auto login system, but i came across a wierd problem (I'm not used to work with IP)

I have this:
Код:
new pip[18];
GetPlayerIp(playerid,pip,sizeof(pip));
and then when i use this:
Код:
if(pip == dini_Int(file,"IP"))
I get the error
Код:
error 033: array must be indexed (variable "pip")
And when i change it to
Код:
if(pip[18] == dini_Int(file,"IP"))
i get this error
Код:
error 032: array index out of bounds (variable "pip")
So should i simply just make it
Код:
if(pip[17] == dini_Int(file,"IP"))
or why is these errors coming?
Reply
#2

pip is a string
Код:
if(!strcmp(pip,dini_Get(file,"IP"),true))
Reply
#3

Oh, ye i forgot, thanks! (:
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)