18.01.2013, 13:26
Hello, I made a function to filter out characters like [ ] * to avoid stars or other wierd things inside a textdraw string.
Now this what I got, but it doesn't work I get only wierd characters out of it.
Maybe somebody sees the fault? because i don't lol.
pawn Код:
stock CompareStringForTextdraw(text[])
{
new strpos;
new invalidstr[3][2] = {
"[","]","*"};
for (new s=0; s<strlen(text); s++)
{
for (new x=0; x<sizeof(invalidstr); x++)
{
strpos = strfind(text, invalidstr[x], true);
if(strpos != -1)
{
strdel(text, strpos, strpos+1);
}
}
}
return text;
}
Maybe somebody sees the fault? because i don't lol.