Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. exceeded maximum number of parent server script variables

exceeded maximum number of parent server script variables

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
5 Posts 2 Posters 686 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • maxiking913undefined Offline
    maxiking913undefined Offline
    maxiking913
    wrote on last edited by maxiking913
    #1

    Good day,

    since days i get this error on my gamemode. i read and wrote with a staff and he said your code has variable leaks.
    i used feds t6 gsc tool to discover them BUT

    child var allocations where count > 1
    
    
    total: 0, total calculated: 327
    
    child var allocations where count > 1
    
    
    total: 0, total calculated: 26782
    
    child var allocations where count > 1
    
    
    total: 0, total calculated: 30029
    
    

    so i guess there are none.
    now i got sth in console as screenshot:
    Screenshot 2023-08-10 234837.png

    anyone able to help?

    error occured with file link:
    -maps/mp/bots/_bots.gsc
    -maps/mp/gametypes/_weapon.gsc
    -maps/mp/gametypes/_battlechatter_mp.gsc

    edit: any variable is set to undefined if not needed and 95% of the variables are only called for players not for the bots.

    edit 2: i guess the script runtime error at function hudmonitor bla bla can be ignored --> the rank.gsc from plutonium and the mapvote from idk which name it is also throw some of this errors. functions working and there is not even a variable in it which is undefined xd

    1 Reply Last reply
    0
    • JezuzLizardundefined Offline
      JezuzLizardundefined Offline
      JezuzLizard Plutonium Staff
      wrote on last edited by
      #2

      Yeah it seems that fed's plugin doesn't work anymore so I guess you can't really do anything about this currently.

      1 Reply Last reply
      0
      • maxiking913undefined Offline
        maxiking913undefined Offline
        maxiking913
        wrote on last edited by
        #3

        Found it i think.

        ill leave this post open and reply back in some days but:
        as it seems there is a limit on simultaneous "variables" that can be given in a period of time.

        after i saw my screenshot i spawned bots in with a delay. each bot ofc sets some values and cleares some afterwards. with the delay between the spawn this error doesnt seem to occur anymore.
        normally the thread would have been waited till bot spawned then spawned another one. but now the delay i talked about is waiting for bot spawned and setup ready and ingame and then spawn another one. this is about 0.2 sec delay, but i could play for like an hour in 1 game without any game crashes.

        this only applies if your variables doesnt leak ofc.

        1 Reply Last reply
        0
        • JezuzLizardundefined Offline
          JezuzLizardundefined Offline
          JezuzLizard Plutonium Staff
          wrote on last edited by
          #4

          There is a hard limit on the amount of variables you can have at once. This error occurs because you've exceeded these limits. There are plenty of variables available on all maps on both MP and ZM. Meaning this error won't happen unless you have a leak or you intentionally spawn in a lot of variables at once. I believe you can spawn in at least 10-30k child variables before you hit the child variable limit of 65536. The parent variable limit is lower at 24536 but parent variables are harder to spawn in unnecessarily because they are threads, structs, arrays, or entities. Child variables are everything else.

          maxiking913undefined 1 Reply Last reply
          0
          • maxiking913undefined Offline
            maxiking913undefined Offline
            maxiking913
            replied to JezuzLizard on last edited by maxiking913
            #5

            JezuzLizard i dont even have this much variables in my Code xd

            Will Stresstest again an will watch but it seems as its fixxed

            1 Reply Last reply
            0

            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Donate