Wrong position of colour embedding
#1

Hi, today I find that if "Full sized space" in Big5 coding(where its value is 0xA140, which is the first Big5 character) is used in colour embedding, the whole text will be coloured wrongly, similar to the bug found in 0.3c RC1.

Code in OnPlayerText:
pawn Code:
ReColorText(chat);
format(string,sizeof(string),"%s(%d): {FFFFFF}%s",nname[playerid],playerid,chat);//nname[playerid] is the nick name of the player
SendClientMessageToAll(GetPlayerColor(playerid),string);
When I use 3 of that character in my nick name with 3 normal dots (".") (see attachment 1) and 4 type an uncoloured text:
Code:
testtttt
The first 3 text characters are wrongly coloured (see attachment 1). The number of wrongly coloured text is equal to the number of that space character in the text.

Other characters works fine as you can see in attachment 2(which the "full sized comma" has a value of 0xA141)

This shouldn't be a problem of my script, because you can find "{FFFFFF}" before the message in the format code, so it must be in white if the message is uncoloured.

I think this is not difficult to fix, so I hope there'll be a fix soon.

Edit:
A simple code to reproduce the problem:
pawn Code:
SendClientMessageToAll(0xFFFF00FF,"test  : {FFFFFF}A quick brown fox jumps over the lazy dog.");
//There're 2 full-sized spaces between the word "test" and the colon ":".
Reply
#2

Try the 0.3d section and there might be a chance it's fixed during RC's, if lots of people confirm it.

What is the full function of ReColorText?
Reply
#3

The ReColorText function is quite similar to Y_less'. The bug should have nothing to do with that.
Reply
#4

Bump, and I added a simple code to reproduce the bug.
Please check it if your server supports Big5 characters.
Reply
#5

i tried
Code:
SendClientMessageToAll(0xFFFF00FF,"test  : {FFFFFF}A quick brown fox jumps over the lazy dog.");
/
and got



whats wrong ? o_O
Reply
#6

it's not a ordinary space character, he uses long space from big5 charset.
Reply
#7

Yes. You probably can't see the bug on ANSI-coded servers.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)