AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie:Reloaded (https://forums.alliedmods.net/forumdisplay.php?f=132)
-   -   error 15: Array index is out of bounds? (https://forums.alliedmods.net/showthread.php?t=276693)

greybird 12-26-2015 12:37

error 15: Array index is out of bounds?
 
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?

Nolongerinthegame 12-28-2015 10:59

Re: error 15: Array index is out of bounds?
 
How many models do you have?

greybird 12-28-2015 16:50

Re: error 15: Array index is out of bounds?
 
Quote:

Originally Posted by nelioneil (Post 2377281)
How many models do you have?

i'm sure i used over 64, this is a test server still tho.

Stewart Anubis 05-25-2021 17:33

Re: error 15: Array index is out of bounds?
 
Quote:

Originally Posted by greybird (Post 2376475)
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.


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

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