04.07.2014, 14:32
Just tested it and it works for me. It looks like you can't return the parameter "string".
Working function for your scenario:
Btw, why did you add "stock" to the function?
Working function for your scenario:
pawn Код:
AddUnderscore(string[])
{
new manipulated[MAX_PLAYER_NAME];
for(new i = 0, l = strlen(string); i < l; i++)
{
manipulated[i] = string[i];
if(string[i] == ' ')
{
manipulated[i] = '_';
}
}
return manipulated;
}

