Auto login - Player IP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Auto login - Player IP (
/showthread.php?tid=154657)
Auto login - Player IP -
Naxix - 14.06.2010
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?
Re: Auto login - Player IP -
Jefff - 14.06.2010
pip is a string
Код:
if(!strcmp(pip,dini_Get(file,"IP"),true))
Re: Auto login - Player IP -
Naxix - 14.06.2010
Oh, ye i forgot, thanks! (: