13.03.2012, 22:32
I've created this command to go back into the folder, and read all of the reports backwards (newest being the most 'recent'), however, it only shows report 0 (which it does properly), and then stalls the server.
Can anyone see what's wrong?
pawn Код:
CMD:checkreports( playerid, params[] )
{
#pragma unused params
new
String[ 128 ],
rePath[ 32 ];
if( IsPlayerAdmin( playerid ) )
{
for( new re; re < FindLastReportID( ); re-- )
{
format( rePath, sizeof( rePath ), "Logs/Reports/Report%d.ini", re );
if(fexist( rePath ) )
{
INI_ParseFile( rePath, "LoadReports_%s", .bExtra = true, .extra = re);
format( String, sizeof( String ), "[R#%d (%s)] %s: "#WHITE"%s", re, reportInfo[ re ][ ReportTime ], reportInfo[ re ][ Reporter ], reportInfo[ re ][ ReportText ] );
SendClientMessage( playerid, c_LIME, String );
}
}
}
return true;
}