K4m4r40 7 Posted April 14, 2015 [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. Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted April 14, 2015 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)); Quote Share this post Link to post Share on other sites
0 K4m4r40 7 Posted April 14, 2015 (edited) 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 Edited April 14, 2015 by K4m4r40 Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted April 14, 2015 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 Quote Share this post Link to post Share on other sites
0 K4m4r40 7 Posted April 15, 2015 pagination system, I will try, thx the tip. Quote Share this post Link to post Share on other sites
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