04.12.2015, 00:38
Alright the issue is simple, I know whats the problem also but I dont know how to resolve it. Warnings are included into the comments inside the first function
ranks are defines perfectly
When im loading the factions
I know the problem is inside rankName = FactionInfo[fid][Rank1] but Im not sure how should I get it other way?
PHP код:
GetPlayerRank(playerid) { //getting player rank, returning string
new rankName[64],fid;
fid = AccInfo[playerid][PlayerFaction];
switch(AccInfo[playerid][PlayerRank]) {
case 0: rankName = "None";
case 1: rankName = FactionInfo[fid][Rank1]; //warning 229: index tag mismatch (symbol "FactionInfo")
case 2: rankName = FactionInfo[fid][Rank2]; //warning 229: index tag mismatch (symbol "FactionInfo")
}
return rankName;
}
PHP код:
enum FInfo {
Rank1[64],
Rank2[64]
}
new
FactionInfo[MAX_FACTIONS][FInfo];
PHP код:
cache_get_field_content(i, "Rank1", string);
strreplace(string, '_', ' ');
format(FactionInfo[i][Rank1], sizeof(string), string);
cache_get_field_content(i, "Rank2", string);
strreplace(string, '_', ' ');
format(FactionInfo[i][Rank2], sizeof(string), string);