Okay, I got it working by copying the name.
pawn Код:
enum TEST
{
STRING[ MAX_PLAYER_NAME ]
}
new
Test[ 5 ][ TEST ]
;
public OnGameModeInit( )
{
strcat( Test[ 0 ][ STRING ], "Test1_Test2", MAX_PLAYER_NAME );
printf( "The name is \"%s\"", NameWithoutUnderscore( Test[ 0 ][ STRING ] ) );
return 1;
}
stock NameWithoutUnderscore( _name[ ] )
{
new
new_name[ MAX_PLAYER_NAME ]
;
for( new i, l = strlen( _name ); i != l; i++ ) if( _name[ i ] == '_' ) _name[ i ] = ' ';
strcpy( new_name, _name, MAX_PLAYER_NAME );
return new_name;
}
stock strcpy( dest[ ], const source[ ], maxlength=sizeof dest )
{
strcat( ( dest[ 0 ] = EOS, dest ), source, maxlength );
}
I'm not really sure why it did not work before.