28.01.2013, 07:55
Hi, I am doing a function to delete the colors like {FFFFFF} from a string, but I can't do that, when I test it in a console, the console do a beep instead of show the result, I will appreciate help.
Function:
Thanks!
Function:
pawn Код:
RemoveColorsFromString(rString[])
{
new firstPos = strfind(rString, "{", false);
new secondPos = strfind(rString, "}", false);
if(firstPos > 0 && secondPos > firstPos)
{
while(firstPos != -1)
{
firstPos = strfind(rString, "{", false);
secondPos = strfind(rString, "}", false);
strdel(rString, firstPos, secondPos);
}
return rString;
}
else return rString;
}
Thanks!