array must be indexed
#1

Hello im makeing a auto login for me script.

Top script
Код:
new pIP[16][MAX_PLAYERS];
Onplayerconnect
Код:
if(!pIP[playerid] == " ") <---- Error
{
    if(pIP[playerid] == plrIP[playerid]) <---Error
	{
Onplayerlogin
Код:
GetPlayerIp(playerid, plrIP[playerid], 16);
pIP[playerid]=plrIP[playerid];
Errors
Код:
error 033: array must be indexed (variable "pIP")
error 033: array must be indexed (variable "pIP")
Thanks for helping
Reply
#2

pawn Код:
new pIP[MAX_PLAYERS][16];
What are you trying to check?
Reply
#3

Quote:
Originally Posted by MadeMan
pawn Код:
new pIP[MAX_PLAYERS][16];
What are you trying to check?
when you login it does
Код:
GetPlayerIp(playerid, plrIP[playerid], 16);
pIP[playerid]=plrIP[playerid];
Reply
#4

pawn Код:
if(!pIP[playerid] == " ") <---- Error
What does that mean?
Reply
#5

Quote:
Originally Posted by MadeMan
pawn Код:
if(!pIP[playerid] == " ") <---- Error
What does that mean?
if pIP is not empty
Reply
#6

pawn Код:
new pIP[MAX_PLAYERS][16];
pawn Код:
if(strlen(pIP[playerid]) != 0)
{
    if(strcmp(pIP[playerid], plrIP[playerid], true) == 0)
    {
Reply
#7

I will try
Reply
#8

Yeah , Thanks it works like a Dream
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)