08.10.2011, 11:19
(
Last edited by leong124; 20/10/2011 at 08:44 AM.
)
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:
When I use 3 of that character in my nick name with 3 normal dots (".") (see attachment 1) and 4 type an uncoloured text:
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:
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);
Code:
testtttt
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 ":".