05.10.2014, 12:37
as the error implies..u cannot make string[] as an index of an array or maybe the fault is in the declaration of global variable
correct me if im wrong
ex: will actually look like if the index is a string
i think you can fix that if u make an enum
pawn Код:
new srPerms[id][perm];
//that should be
new srPerms[id][perm[]];//perm needs an enum
ex: will actually look like if the index is a string
pawn Код:
CMD:example(playerid,params[])
{
new string[]={a,b,c,d,e};
StaffRolePerm(playerid,string[]);
return 1;
}
stock StaffRolePerm(playerid,string[])//subbed already
{
return srPerms[playerid][{a,b,c,d,e}];//this will give you error because index "perm" is not yet enumed
}
pawn Код:
enum perm
{
blah1,
blah2,
blah3,
blah4,
blah5,
}