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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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