[ HELP ] error 033: array must be indexed (variable "IPs")
#1

pawn Код:
new jmeno[MAX_PLAYER_NAME], cesta[255], cesta1[255], IPs[16];
GetPlayerIp(playerid, IPs, sizeof(IPs));
GetPlayerName(playerid, jmeno, sizeof(jmeno));
format(cesta, sizeof(cesta), "bond/%s.txt", jmeno);
format(cesta1, sizeof(cesta1), "%s", dini_Get(cesta, "IP"));

if(IPs == cesta1) //Error
{

}else{

}
Error:
Код:
error 033: array must be indexed (variable "IPs")
Pls help . Thank you
Reply
#2

replace the error line with
pawn Код:
if(!strcmp(cesta1, IPs, false))
EDIT:
pawn Код:
new jmeno[MAX_PLAYER_NAME], cesta[255], cesta1[255], IPs[16];
GetPlayerIp(playerid, IPs, sizeof(IPs));
GetPlayerName(playerid, jmeno, sizeof(jmeno));
format(cesta, sizeof(cesta), "bond/%s.txt", jmeno);
format(cesta1, sizeof(cesta1), dini_Get(cesta, "IP")); //no need to use %s here.

if(!strcmp(cesta1, IPs, false))
{

}
else
{

}
Reply
#3

Quote:
Originally Posted by biltong
replace the error line with
pawn Код:
if(!strcmp(cesta1, IPs, false))
Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)