Small string issue
#1

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

PHP код:
GetPlayerRank(playerid) { //getting player rank, returning string
    
new rankName[64],fid;
    
fid AccInfo[playerid][PlayerFaction];
    switch(
AccInfo[playerid][PlayerRank]) {
        case 
0rankName "None";
        case 
1rankName FactionInfo[fid][Rank1]; //warning 229: index tag mismatch (symbol "FactionInfo")
        
case 2rankName FactionInfo[fid][Rank2]; //warning 229: index tag mismatch (symbol "FactionInfo")
    
}
    return 
rankName;

ranks are defines perfectly
PHP код:
enum FInfo {
    
Rank1[64],
    
Rank2[64]
}
new
    
FactionInfo[MAX_FACTIONS][FInfo]; 
When im loading the factions
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); 
I know the problem is inside rankName = FactionInfo[fid][Rank1] but Im not sure how should I get it other way?
Reply


Messages In This Thread
Small string issue - by TwinkiDaBoss - 04.12.2015, 00:38
Re: Small string issue - by Jefff - 04.12.2015, 00:43
Re: Small string issue - by TwinkiDaBoss - 04.12.2015, 00:45
Re: Small string issue - by Jefff - 04.12.2015, 00:51
Re: Small string issue - by TwinkiDaBoss - 04.12.2015, 00:54
Re: Small string issue - by TwinkiDaBoss - 04.12.2015, 02:28

Forum Jump:


Users browsing this thread: 1 Guest(s)