AntiSwear -> while & for loops errors :/
#4

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
stock AntiSwear(string[])
{
    new pos;

    for(new x=0; x != sizeof(BadWords); x++)
        while((pos = strfind(string, BadWords[x], true)) != -1)
            for(new i = pos+1, j = pos + strlen(BadWords[x])-1; i < j; i++)
                string[i] = '*';

}
Thanks,works but I have changed the start pos to 0 and end with last character, cuz
i don't want:

i***t
i want, *****

Thank you! (:
Reply


Messages In This Thread
AntiSwear -> while & for loops errors :/ - by erminpr0 - 07.12.2013, 23:30
Re: AntiSwear -> while & for loops errors :/ - by Jefff - 08.12.2013, 00:11
Re: AntiSwear -> while & for loops errors :/ - by Astralis - 08.12.2013, 00:16
Re: AntiSwear -> while & for loops errors :/ - by erminpr0 - 08.12.2013, 11:08

Forum Jump:


Users browsing this thread: 1 Guest(s)