Loop stalling server?
#1

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.

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;
}
Can anyone see what's wrong?
Reply


Messages In This Thread
Loop stalling server? - by 2KY - 13.03.2012, 22:32
Re: Loop stalling server? - by Vince - 13.03.2012, 22:35
Re: Loop stalling server? - by 2KY - 13.03.2012, 22:37

Forum Jump:


Users browsing this thread: 1 Guest(s)