Jump to content
×
×
  • Create New...

QC error message for special characters next to apostrophes


Recommended Posts

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
  • Love 8
  • Good 4

WRnRW3H.gif

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 36

      Destroy Item System

    2. 1

      Brillances

    3. 0

      Fusion.org is Looking for Staff Members

    4. 1

      Brillances

    5. 3

      ELONIA2 | PVM-MEDIUM | 11 LANGUAGES | INTERNATIONAL | A NEW STORY

    6. 4

      Spider Queen not spawining in spider dungeon v1

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.