Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Bypass max menus precached error

  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

    Bypass max menus precached error

    Code:
    ******* script runtime error *******
    Too many menus precached. Max allowed menus is 32
    I need all the menus and all the menus are scriptmenus. Is there a way to fix this error and to have more menus? In the limits thread you were talking about 64 menus.

  2. #2
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    two suggestions:
    • reuse your menues (show/hide on dvar)
    • maybe multiple menus in one file

  3. The Following User Says Thank You to serthy For This Useful Post:

    Ni3ls (12th August 2014)

  4. #3
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Do I need to precache every menu? And I read somewhere about Loadmenu() but I cant find that anymore. This limit really sucks

  5. #4
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    Do I need to precache every menu? And I read somewhere about Loadmenu() but I cant find that anymore. This limit really sucks
    It appears they increased this limit after 1.0.
    Edit: 1.3 is also limited to 32.

    Quote Originally Posted by RobsoN View Post
    Selbie told me there is 32 limit of newHudElem and 32 of newClientHudElem.

    And why 64 menus? On 1.0:
    ******* script runtime error *******
    Too many menus precached. Max allowed menus is 32
    Also use functions in menus. It will save you a lot of time when you want to reuse menus.
    http://killtube.org/showthread.php?1...in-menu-files!

    Edit 2: I could try to increase the limit by changing hex values in the binary (this might cause problems)

    PHP Code:
    int __cdecl sub_8110EC2()
    {
      
    int v1// eax@13
      
    char dest// [sp+10h] [bp-418h]@4
      
    char s[4]; // [sp+418h] [bp-10h]@1
      
    int i// [sp+41Ch] [bp-Ch]@1

      
    *(_DWORD *)sub_808456A(0);
      for ( 
    0<= 31; ++)
      {
        
    sub_809107E(34, &dest1024);
        if ( !
    sub_80B5620(&dest, *(_DWORD *)s) )
          return 
    sub_8060B7C("Script tried to precache the menu '%s' more than once\n"s[0]);
      }
      for ( 
    0; ; ++)
      {
        if ( 
    <= 31 )
        {
          
    sub_809107E(34, &dest1024);
          if ( 
    dest )
            continue;
        }
        break;
      }
      if ( 
    == 32 )
      {
        
    v1 sub_80B59CE("Too many menus precached. Max allowed menus is %i"32);
        
    sub_8084DB4(v1);
      }
      return 
    sub_8090E6C(34, *(char **)s);

    I uploaded a hexed version to 64. (untested)
    (changed 32 to 64, 31 to 63)
    Attached Files Attached Files
    Last edited by Mitch; 12th August 2014 at 11:49.

  6. The Following User Says Thank You to Mitch For This Useful Post:

    Ni3ls (12th August 2014)

  7. #5
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Can you also patch the windows file so i can test at home?

  8. #6
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    Can you also patch the windows file so i can test at home?
    (backup included)

    Edit: and again untested
    Attached Files Attached Files

  9. The Following User Says Thank You to Mitch For This Useful Post:

    Ni3ls (12th August 2014)

  10. #7
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Works like a charm!

  11. The Following User Says Thank You to Ni3ls For This Useful Post:

    Mitch (12th August 2014)

  12. #8
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    Works like a charm!
    Have you tested the last menu that you added? (menu 33)

    (i thought it might crash because array where it saves the menu names overflows)

  13. #9
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Didnt saw this reply, but I dont get any error now. Im going over the 32 menus now :P

  14. #10
    Private First Class php's Avatar
    Join Date
    Nov 2012
    Posts
    142
    Thanks
    28
    Thanked 116 Times in 59 Posts
    I think he's asking whether the menu's actually work and if it doesn't just overwrite other CS_* indexes of the configstrings and pretty sure this max menu value is hardcoded in the client aswell.

  15. The Following User Says Thank You to php For This Useful Post:

    Ni3ls (29th September 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •