Is this a bug? Perhaps textdraw related.
#7

I use the following functions to ensure this never happens:

pawn Code:
stock CountChars(txt[],ch='~')
{
    new d,cnt;
    while(txt[d] != EOS)
    {
        if(txt[d] == ch) cnt++;
        d++;
    }
    return cnt;
}
Then check if the number of ~'s in the gametext is odd with ******' isodd().

If it's something like /announce you could show an error, but if it's a gametext in part of your mode, it'll be a bit more tricky. I would suggest making a GameTextForPlayerEx() function or something, and in that function if there are an odd number of ~'s, don't show the gametext and log it to a file, then you can keep an eye on that file to find out which gametext string is causing it.

Good luck.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)