SA-MP Forums Archive
Array must be indexed? - 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: Array must be indexed? (/showthread.php?tid=117790)



Array must be indexed? - introzen - 01.01.2010

Hey, I got a problem

Why do I get Error Code 033: Array must be indexed on this?:

Error is placed on the line:
pawn Код:
if(pName == HouseInfo[h][hName])
pawn Код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
if(pName == HouseInfo[h][hName])
thanks


Re: Array must be indexed? - MerLow - 01.01.2010

It's a string comparison:

pawn Код:
if(!strcmp(pName,HouseInfo[h][hName],true))



Re: Array must be indexed? - introzen - 01.01.2010

Quote:
Originally Posted by Merlо
It's a string comparison:

pawn Код:
if(!strcmp(pName,HouseInfo[h][hName],true))
thanks