Jump to content

Recommended Posts

  • Honorable Member

Hey guys,

Most of you noticed if you have a special character like á, é, ő, etc. at the beginning or end of a string qc will not work and displays no error message. It is because it throws an error but in it's own way by pushing a string to the top of the lua stack and calling exit so you can't catch it normally. Here is a method how you can make these messages visible.

 

0721381.png

 

0722251b.png

 

Actually we only have to write a few lines.

 

Open qc.cc and add this function

void print_exception()
{
	int top = lua_gettop(L);
	if (0 != top && LUA_TSTRING == lua_type(L, top))
	{
		std::cerr << lua_tostring(L, top);
	}
}

 

Now go to the main function and add this line to the beginning of it:

atexit(&print_exception);

 

So it should look like this:

 

0721382.png

 

Now you will see the exceptions like

 

0721383.png

 

Good luck guys and hope you like it!  ❤️

  • Metin2 Dev 1
  • Good 4
  • Love 1
  • Love 9

992404397646696589.png
Former C++ Developer at Gameloft on DML
Join my Discord: Distraught Labs

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.