Hallo!
Ich habe leider ein Problem, undzwar wird das nicht ausgelesen...
Ganz oben:
enum gInfo
{
RankN1,
RankN2,
RankN3,
RankN4,
RankN5,
RankN6,
RankNL,
}
new GangInfo[100][gInfo];
OnGameModeInit
new File: UserFile = fopen("rFraktionen/Aztecas.ini", io_read);
new key[256] , val[256];
new Data[256];
while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
if( strcmp( key , "RankN1" , true ) == 0 ) { val = ini_GetValue( Data ); GangInfo[1][RankN1] = strval( val ); }
if( strcmp( key , "RankN2" , true ) == 0 ) { val = ini_GetValue( Data ); GangInfo[1][RankN2] = strval( val ); }
if( strcmp( key , "RankN3" , true ) == 0 ) { val = ini_GetValue( Data ); GangInfo[1][RankN3] = strval( val ); }
if( strcmp( key , "RankN4" , true ) == 0 ) { val = ini_GetValue( Data ); GangInfo[1][RankN4] = strval( val ); }
if( strcmp( key , "RankN5" , true ) == 0 ) { val = ini_GetValue( Data ); GangInfo[1][RankN5] = strval( val ); }
if( strcmp( key , "RankN6" , true ) == 0 ) { val = ini_GetValue( Data ); GangInfo[1][RankN6] = strval( val ); }
if( strcmp( key , "RankNL" , true ) == 0 ) { val = ini_GetValue( Data ); GangInfo[1][RankNL] = strval( val ); }
}
fclose(UserFile);
Befehl zum Anzeigen:
if(strcmp(cmd,"/ranknamen",true)==0)
{
format(string,sizeof(string),"Rank1:%s | Rank2:%s | Rank3:%s | Rank4:%s | Rank5:%s | Rank6:%s | Leader:%s",GangInfo[1][RankN1],GangInfo[1][RankN2],GangInfo[1][RankN3],GangInfo[1][RankN4],GangInfo[1][RankN5],GangInfo[1][RankN6],GangInfo[1][RankNL]);
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
Angezeigt wird nur das:
Zitat
Rank1: | Rank2: | Rank3: | Rank4: | Rank5: | Rank6: | Leader:
Was mache ich falsch?