Jump to content

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


Go to solution Solved by Metin2 Dev,

Recommended Posts

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
}

 

  • Bot
  • Solution

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

  • Love 1

english_banner.gif

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

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

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

  • Love 1
  • Management

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...

  • Love 1

raw

raw

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.