SA-MP Forums Archive
Invalid Subscript (not an array or too many subscripts): "Member" - 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)
+--- Thread: Invalid Subscript (not an array or too many subscripts): "Member" (/showthread.php?tid=502237)



Invalid Subscript (not an array or too many subscripts): "Member" - MikeMike1997 - 22.03.2014

Код:
C:\Users\Mike\Desktop\SA-MP\gamemodes\bare.pwn(132) : error 028: invalid subscript (not an array or too many subscripts): "Member"
C:\Users\Mike\Desktop\SA-MP\gamemodes\bare.pwn(132) : warning 215: expression has no effect
C:\Users\Mike\Desktop\SA-MP\gamemodes\bare.pwn(132) : error 001: expected token: ";", but found "]"
C:\Users\Mike\Desktop\SA-MP\gamemodes\bare.pwn(132) : error 029: invalid expression, assumed zero
C:\Users\Mike\Desktop\SA-MP\gamemodes\bare.pwn(132) : fatal error 107: too many error messages on one line
Код:
public OnPlayerSpawn(playerid)
{
new filo[55];
format(filo,55,"org%d.ini",Member[playerid]);  //line 132
SetPlayerColor(ID,HexToInt(dini_Get(filo,"Color")));
	return 1;
}



Re: Invalid Subscript (not an array or too many subscripts): "Member" - Private200 - 22.03.2014

Have you done the

PHP код:
new Member[MAX_PLAYERS]; 
on top of your script? If not, you have to add that.


Re: Invalid Subscript (not an array or too many subscripts): "Member" - MikeMike1997 - 22.03.2014

Thank you! I feel like such an idiot XD