[ HELP ] error 033: array must be indexed (variable "IPs") - 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: [ HELP ] error 033: array must be indexed (variable "IPs") (
/showthread.php?tid=143864)
[ HELP ] error 033: array must be indexed (variable "IPs") -
ToMmY1547 - 24.04.2010
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
Re: [ HELP ] error 033: array must be indexed (variable "IPs") -
biltong - 24.04.2010
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
{
}
Re: [ HELP ] error 033: array must be indexed (variable "IPs") -
ToMmY1547 - 24.04.2010
Quote:
Originally Posted by biltong
replace the error line with
pawn Код:
if(!strcmp(cesta1, IPs, false))
|
Thank you