Jump to content

Recommended Posts

Hi everyone,

I need change lenght for "QUEST_STATE_MAX_LEN".. Default size is 64, but I have after changes problems.. Just after open longest quest client frozen..

My changes:

Serverside:

common/tables.h

#define QUEST_STATE_MAX_LEN	64

to

#define QUEST_STATE_MAX_LEN	128

Clientside:

eterlib/parses.cpp // 2x

if (iValueLen >= 64)
				{
					TraceError("argument value overflow: must be shorter than 64 letters");
					return false;
				}

to

if (iValueLen >= 128)
				{
					TraceError("argument value overflow: must be shorter than 128 letters");
					return false;
				}

What can I do bad?

Edit: Ok I´m idiot!.. I forgot this:

char szValue[64 + 1];

to

char szValue[128 + 1];

same files in clientside before first code..

Okey thanks, here is free guide if someone need too :D

Link to comment
https://metin2.dev/topic/21891-howto-quest_state_max_len/
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

10 hours ago, Flourine said:

Buffer overflow i think. I had same and i used one fix from another forum

Yes you are right.. I create mistake in code.. Forgot change all code.. Now working fine..

10 hours ago, filipw1 said:

Why would I change that?

For example if you need more characters than 64 in your quest functions.. I want this for function "say_item"  because I need longer desc..

Link to comment
https://metin2.dev/topic/21891-howto-quest_state_max_len/#findComment-119041
Share on other sites

  • Former Staff

You have the define for one reason, use it!

Stop hardcoding.

 

if (iValueLen >= QUEST_STATE_MAX_LEN)

char szValue[QUEST_STATE_MAX_LEN + 1];

  • Love 1

Everyday you wake up as a Metin2 developer is a bad day...

METIN1 src when

Link to comment
https://metin2.dev/topic/21891-howto-quest_state_max_len/#findComment-119045
Share on other sites

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.