SA-MP Forums Archive
one error. - 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: one error. (/showthread.php?tid=363489)



one error. - TaLhA XIV - 27.07.2012

PHP код:
switch(PlayerInfo[playerid][team]){ 
error:

PHP код:
error 033: array must be indexed (variable "team"
What is the problem in this?


Re: one error. - Marlon_Lorran - 27.07.2012

can You put the enum pInfo here.?


Re: one error. - TaLhA XIV - 28.07.2012

PHP код:
enum pInfo {
    
TEAM_ME,
    
TEAM_SE,
    
TEAM_TE,
    
pMoney,
    
pScore,
    
pName,
    
Wolf,
    
Developer,

okay please fix this for me.


Re: one error. - Cjgogo - 28.07.2012

Use this simple system better:
pawn Код:
#define TEAM_ME 0
#define TEAM_SE 1
#define TEAM_TE 2

new team[MAX_PLAYER];

if(team[playerid]==TEAM_ME){ code}
And take the teams out of enumeration...