Raised This Month: $ Target: $400
 0% 

Run time error 4: index out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 02-12-2017 , 08:07   Re: Run time error 4: index out of bounds
Reply With Quote #5

@Black Rose thank you. it helped

now i have new error:
Quote:
formatted incorrectly - parameter 8 (total 7)
Run time error 25: parameter error
Code:
stock ColorPrint( const index, const string[], any:... )
{
    new szMsg[ 191 ], Players[ 32 ], PNum = 1;
    
    static iLen; iLen = formatex( szMsg, charsmax( szMsg ), "^4[Joiues]^1 ");
    
    vformat( szMsg[ iLen ], charsmax( szMsg ) - iLen, string, 3 );
    
    if ( index )
        Players[ 0 ] = index;
    
    else
        get_players( Players, PNum, "ch" );
    
    for ( new i; i < PNum; i++ )
    {
        if( is_user_connected( Players[ i ] ) )
        {
            message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, Players[ i ] );
            
            write_byte( Players[ i ] );
            
            write_string( szMsg );
            
            message_end( );
        }
    }
    
    return 1;
}
and here same error:
Code:
GetPosition(Client)
{
    static Position, Size, SteamID[32]
    for(Position = 0, Size = ArraySize(g_SteamID); Position < Size; Position++)
    {
        ArrayGetString(g_SteamID, Position, SteamID, 31) // here
        
        if(equal(SteamID, g_Data[Client][DATA_STEAMID]))
        return Position + 1
    }
    
    return 0
}
__________________
Қазақстан Республикасы
Snitch is offline
Send a message via Skype™ to Snitch
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode