View Single Post
Stewart Anubis
Junior Member
Join Date: Jul 2020
Old 05-25-2021 , 17:33   Re: error 15: Array index is out of bounds?
Reply With Quote #4

Quote:
Originally Posted by greybird View Post
I'm getting this error when trying to put other models, i already have 50+ already so i think i know how to put them, here is error:

Code:
L 12/26/2015 - 19:58:26: [SM] Plugin encountered error 15: Array index is out of bounds
L 12/26/2015 - 19:58:26: [SM] Displaying call stack trace for plugin "zombiereloaded.smx":
L 12/26/2015 - 19:58:26: [SM]   [0]  Line 107, zr/models.inc::ModelsLoad()
L 12/26/2015 - 19:58:26: [SM]   [1]  Line 222, zombiereloaded.sp::OnConfigsExecuted()
looking around line 107 in models.inc i saw
Code:
if (ModelCount > MODELS_MAX)
is there a limit to models we can use? csgo server but doubt it is the reason and the problem gets solved if i remove any 2 model entries in configs/zr/models.txt , if there is a limit can it be removed or increased at least?

Thanks

EDIT: Now that i actually convinced myself to read some files i was able to solve it by changing "MODELS_MAX" to 128 (default 48 ) in models.h.inc on line 31 and "ZR_CLASS_MAX" to 128 (default 64) in playerclasses.inc on line 47 and then recompiling zombiereloaded.sp , you can change max numbers to your liking but i don't know what side affects changing default numbers will cause But shouldn't reaching maximum model number give an error like "you've reached maximum model number, ignoring rest" like reaching maximum playerclasses instead of error:15 array index?
I advise you to use a separate plugin to control the models since you want to exceed the MAXPLAYER amount of the 32T 32 Ct server. Changing zombireloaded would be more complex than just changing "MODEL_MAX". It even works but it would be a lot of processing for just one plugin, and it would cause delays in Precached consequently occasional errors.
Stewart Anubis is offline