• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Where can i change the font of the text of console? (instead of black, green)

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
Where can i set all text that apear in the console green? (or only the begining part [The Forgotten server 0.3.6.....]?
Any way to change background?
[cpp]HELP me please, and i will rep+++[/cpp]
 
If you put it before last #endif the precompiler maybe doesn't even get there..
 
If dev-cpp then:
CTRL+ALT+SHIFT and search for main() or the main function and then write it in the line after main
 
Search for main( without second bracket since there are always some parameters..
 
found 3:
1 -
Code:
int [B]main(int argc, char *argv[])[/B]
{
	StringVec args = StringVec(argv, argv + argc);
	if(argc > 1 && !argumentsHandler(args))
		return 0;

#else
void serverMain(void* param)
{
	std::cout.rdbuf(&g_logger);
	std::cerr.rdbuf(&g_logger);

#endif
	std::set_new_handler(allocationHandler);
	ServiceManager servicer;
	g_config.startup();

	#ifdef __OTSERV_ALLOCATOR_STATS__
	boost::thread(boost::bind(&allocatorStatsThread, (void*)NULL));
	// TODO: destruct this thread...
	#endif

2 -
Code:
void [B]serverMain(void* param)[/B]
{
	std::cout.rdbuf(&g_logger);
	std::cerr.rdbuf(&g_logger);

#endif
	std::set_new_handler(allocationHandler);
	ServiceManager servicer;
	g_config.startup();

	#ifdef __OTSERV_ALLOCATOR_STATS__
	boost::thread(boost::bind(&allocatorStatsThread, (void*)NULL));
	// TODO: destruct this thread...
	#endif
	#ifdef __EXCEPTION_TRACER__
	ExceptionHandler mainExceptionHandler;
	mainExceptionHandler.InstallHandler();
	#endif
	#ifndef WINDOWS

	// ignore sigpipe...
	struct sigaction sigh;
	sigh.sa_handler = SIG_IGN;
	sigh.sa_flags = 0;
	sigemptyset(&sigh.sa_mask);
	sigaction(SIGPIPE, &sigh, NULL);

3 -
Code:
int32_t WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int32_t WindowStyle)
{
	MSG messages;
	WNDCLASSEX wincl;
	GUI::getInstance()->initTrayMenu();
	GUI::getInstance()->initFont();
	wincl.hInstance = hInstance;
	wincl.lpszClassName = "forgottenserver_gui";
	wincl.lpfnWndProc = WindowProcedure;
	wincl.style = CS_DBLCLKS;
	wincl.cbSize = sizeof(WNDCLASSEX);
	wincl.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_ICON));
	wincl.hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_ICON), IMAGE_ICON, 16, 16, 0);
	wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
	wincl.lpszMenuName = MAKEINTRESOURCE(ID_MENU);
	wincl.cbClsExtra = 0;
	wincl.cbWndExtra = 0;
	wincl.hbrBackground = (HBRUSH)COLOR_BACKGROUND;
	if(!RegisterClassEx(&wincl))
		return 0;
 
Try to replace with this:
Code:
int main(int argc, char *argv[])
{
	StringVec args = StringVec(argv, argv + argc);
	if(argc > 1 && !argumentsHandler(args))
		return 0;

#else
void serverMain(void* param)
{
	std::cout.rdbuf(&g_logger);
	std::cerr.rdbuf(&g_logger);

#endif
	#ifdef WIN32
		system("color 0a");
	#endif
	std::set_new_handler(allocationHandler);
	ServiceManager servicer;
	g_config.startup();

	#ifdef __OTSERV_ALLOCATOR_STATS__
	boost::thread(boost::bind(&allocatorStatsThread, (void*)NULL));
	// TODO: destruct this thread...
	#endif
 
Go to the folder where your .dev file is and there will be a .exe file. Put that .exe in your server folder and use it as server..
 
REP ++ PLEASE !!

semttulonv.png


semttulo2be.png
 
i
is
isn
isnt
isnt
isnt t
isnt th
isnt the
isnt ther
isnt there
isnt there a
isnt there a w
isnt there a wa
isnt there a way
isnt there a way i
isnt there a way in
isnt there a way in s
isnt there a way in so
isnt there a way in sou
isnt there a way in sour
isnt there a way in sourc
isnt there a way in source
isnt there a way in source c
isnt there a way in source co
isnt there a way in source cod
isnt there a way in source code
isnt there a way in source code?


how long did it take for you do that? :O
 
Back
Top