Jump to content

Advanced Locale Text


Recommended Posts

Hello everyone

İ am using lc_text like this.

open server/game/src/locale.hpp
  
find
  
	#define LC_TEXT(str) locale_find(str)
  
remove and add

	const char* LC_TEXT(str,...)
	{
		char locale_text[CHAT_MAX_LEN + 1];
		va_list args;
		va_start(args, str);
		int len = vsnprintf(locale_text, sizeof(locale_text), locale_find(str), args);
		va_end(args);
		return locale_text;
	}


Example:

Old version:

char buf[256];
sprintf(buf, LC_TEXT("HELLO"),"ARG1",2,"ARG3");
ChatPacket(CHAT_TYPE_INFO, buf);

New Version:

ChatPacket(CHAT_TYPE_INFO, LC_TEXT("HELLO","ARG1",2,"ARG3"));

 

  • Sad 1
  • Love 1
Link to comment
Share on other sites

Announcements



  • Similar Content

  • Similar Content

  • Similar Content

  • Tags

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.