exceeded maximum number of parent server script variables
-
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 BUTchild 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:
anyone able to help?
error occured with file link:
-maps/mp/bots/_bots.gsc
-maps/mp/gametypes/_weapon.gsc
-maps/mp/gametypes/_battlechatter_mp.gscedit: 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
-
Yeah it seems that fed's plugin doesn't work anymore so I guess you can't really do anything about this currently.
-
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.
-
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.
-
JezuzLizard i dont even have this much variables in my Code xd
Will Stresstest again an will watch but it seems as its fixxed