Jump to content
metin2dev
  • 0
Sign in to follow this  
Traceur3RUN

solved How I Can Load locale.cfg from soure? disable from client folder

Question

Hello, how i can remove locale.cfg

and something like this do

 

//old LocaleService_LoadConfig("locale.cfg");

LocaleService_LoadConfig("1012 0 pl"); //new

 

void LocaleService_LoadConfig(const char* fileName)
{
	NANOBEGIN
	FILE* fp = fopen(fileName, "rt");

	if (fp)
	{		
		char	line[256];			
		char	name[256];
		int		code;
		int		id;
		if (fgets(line, sizeof(line)-1, fp))
		{
			line[sizeof(line)-1] = '\0';
			sscanf(line, "%d %d %s", &id, &code, name);

			MULTI_LOCALE_REPORT_PORT		= id;
			MULTI_LOCALE_CODE				= code;
			strcpy(MULTI_LOCALE_NAME, name);
			sprintf(MULTI_LOCALE_PATH, "locale/%s", MULTI_LOCALE_NAME);
		}			
		fclose(fp);
	}
	NANOEND
}

 

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

What about this?

void LocaleService_LoadConfig()
{	
    MULTI_LOCALE_REPORT_PORT		= 1012,
    MULTI_LOCALE_CODE				= 0;
    strcpy(MULTI_LOCALE_NAME, "pl");
    sprintf(MULTI_LOCALE_PATH, "locale/%s", "pl");		
}

#HardCoded

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
11 minut temu, Chyu ^^ napisał:

What about this?


void LocaleService_LoadConfig()
{	
    MULTI_LOCALE_REPORT_PORT		= 1012,
    MULTI_LOCALE_CODE				= 0;
    strcpy(MULTI_LOCALE_NAME, "pl");
    sprintf(MULTI_LOCALE_PATH, "locale/%s", "pl");		
}

#HardCoded

client crash

Share this post


Link to post
Share on other sites
  • 0
1 minutę temu, Chyu ^^ napisał:

Would be great to know more info.
Did you removed argument from declaration of function?

i remove this line LocaleService_LoadConfig("locale.cfg"); from UserInterface.cpp

Share this post


Link to post
Share on other sites
  • 0
14 minut temu, Chyu ^^ napisał:

How do you want to get those data if you removed calling?

from source. not from loccale.cfg

 

#EDIT just change to LocaleService_LoadConfig(); in Userinterface.cpp

sory im realy idiot xD

 

thanks, solved

  • Haha 1

Share this post


Link to post
Share on other sites
  • 0

Just disable thr function and it's declarations and change the default variables (set to ymir by default and filled up when the locale is loaded)

I just needed to do that, nothing more...

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×