Raised This Month: $12 Target: $400
 3% 

error 15: Array index is out of bounds?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
greybird
Member
Join Date: Jul 2011
Old 12-26-2015 , 12:37   error 15: Array index is out of bounds?
Reply With Quote #1

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?

Last edited by greybird; 12-27-2015 at 09:15.
greybird is offline
Nolongerinthegame
AlliedModders Donor
Join Date: Sep 2005
Old 12-28-2015 , 10:59   Re: error 15: Array index is out of bounds?
Reply With Quote #2

How many models do you have?
Nolongerinthegame is offline
greybird
Member
Join Date: Jul 2011
Old 12-28-2015 , 16:50   Re: error 15: Array index is out of bounds?
Reply With Quote #3

Quote:
Originally Posted by nelioneil View Post
How many models do you have?
i'm sure i used over 64, this is a test server still tho.
greybird is offline
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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode