Jump to content
  • 0
Sign in to follow this  
K4m4r40

NPC Menu too long

Question

 

[Warning] NPC Menu too long! (source:Bre@k Maps / length:10897)

 

is possible to increase the maximum characters on the menu?

 

My menu has more than 70 maps....  <_< 

 

Thx for help.

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

if you increase it will crash your client lol

 

script.c

/* menus beyond this length crash the client (see bugreport:6402) */		if( StrBuf->Length(&buf) >= 2047 ) {			struct npc_data * nd = map->id2nd(st->oid);			char* menu;			CREATE(menu, char, 2048);			safestrncpy(menu, StrBuf->Value(&buf), 2047);			ShowWarning("NPC Menu too long! (source:%s / length:%d)n",nd?nd->name:"Unknown",StrBuf->Length(&buf));			clif->scriptmenu(sd, st->oid, menu);			aFree(menu);		} else			clif->scriptmenu(sd, st->oid, StrBuf->Value(&buf));

Share this post


Link to post
Share on other sites
  • 0

has some way to show the large menu without spending limit?

I'm out of ideas hehe.

 

I thought of something like:
menu"Previous maps ...",return,"map 61",map_61,"map 62",map_62,"map 63",map_63,"map 64",map_64,"map 65",map_65,"map 66",map_66,"map 67",map_67,"map 68",map_68,"map 69",map_69,"map 70",map_70; 

 

gave a dismal now  :lol:

Edited by K4m4r40

Share this post


Link to post
Share on other sites
  • 0

you could use a pagination system, I've seen several scripts using it in order to avoid this problem, you may want to search for some scripts like that, sorry but I don't have any example and my scripting level is not that advanced lol

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.