Raised This Month: $12 Target: $400
 3% 

Translations and colors.inc issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
-.-Owned Myself-.-
Member
Join Date: Jul 2008
Old 12-08-2010 , 05:07   Translations and colors.inc issue
Reply With Quote #1

Hello, I'm having some issues getting colours to work in translation files.

I have these lines:

PHP Code:
Format(Buffersizeof(Buffer), "%t""TradeChatLeft"g_Prefix,  ClientName);
SendMessageTranslations(clientBuffer); 
PHP Code:
stock SendMessageTranslations(client, const String:Message[512])
{
    for(new 
i=1<= MaxClientsi++)
    {
        if(
g_bClientIsTrading[i])
        {
            
CPrintToChatEx(iclientMessage);
        }
    }
    
PrintToServer(Message);

But the output of this in chat is:
Code:
[Trade Chat] \x3Aurora [SuRƒ] \x4has joined the trade chat!
Translation File snippet:
Code:
"TradeChatLeft"
    {
        "#format"    "{1:s},{2:s}"
        "en"        "{1}{teamcolor}{2}{green} has left the trade chat!"
    }
There is another key which is similar to this and has the same issue. I would like to release this plugin publicly so I would very much like this to be the first one I release with translation capabilities (although there's only a few things that need translating at the moment).

There are no errors displayed and PrintToServer reveals this:
Code:
{default}[{green}Trade Chat{default}]{green} \x3Aurora [SuRƒ] \x4has left the trade chat!
So I believe that it's just an issue with how I am doing things with the translation file. This is my first plugin using translations so any help on this would be most appreciated!
-.-Owned Myself-.- is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-08-2010 , 16:46   Re: Translations and colors.inc issue
Reply With Quote #2

don't understand why you mix colors.inc and "color code" ??
But anyway.. it should \x03 & \x04


wait a minute...


Works great...

I assume you have something in
PHP Code:
Format(Buffersizeof(Buffer), "%t""TradeChatLeft"g_Prefix,  ClientName); 
How you have done g_Prefix and ClientName

*edit
Re-download also colors.inc and put it in your ...include/ folder.

edit edit*
What game ?
__________________
Do not Private Message @me

Last edited by Bacardi; 12-08-2010 at 17:55.
Bacardi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode