20.07.2011, 21:49
Interesting, I got it working when I tested with this code:
However, but not when using the shortcut
So using, in your code, Fix(caption), it should work correctly. Try printing that in the console too, when you put it into the dialog, and see if it shows a line in the console.
Here is the stock function I tested with:
pawn Code:
new str[ 128 ];
strins( str, "hello\nthere", 0 );
Fix( str );
printf( "STRING: %s", str );
pawn Code:
printf( Fix( "hello\nthere" ) );
Here is the stock function I tested with:
pawn Code:
Fix( string[ ] )
{
for( new i = 0, j = strlen( string ); i < j; i++ )
{
if( string[ i ] == '\n' )
{
strdel( string, i, i + 1 );
strins( string, "\n", i, 1 );
}
}
return string;
}