Raised This Month: $32 Target: $400
 8% 

Server crashes Run time error 4: index out of bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nunuxer
Junior Member
Join Date: Jan 2021
Old 02-13-2021 , 10:03   Server crashes Run time error 4: index out of bounds
Reply With Quote #1

Server crashes when the map is changing, logs error:

PHP Code:
L 02/13/2021 15:23:29Start of error session.
L 02/13/2021 15:23:29Info (map "zm_deko2") (file "addons/amxmodx/logs/error_20210213.log")
L 02/13/2021 15:23:29: [AMXXDisplaying debug trace (plugin "zombie_plague_ultimate.amxx"version "1.8.3")
L 02/13/2021 15:23:29: [AMXXRun time error 4index out of bounds 
L 02
/13/2021 15:23:29: [AMXX]    [0zombie_plague_ultimate.sma::fw_PlayerKilled (line 4971
Line 4971 in zombie_plague_ultimate.sma:

PHP Code:
if (g_nemesis[victim] || g_assassin[victim] || (g_assassin[attacker] && get_pcvar_num(cvar_nemfraggore))) 
Is it possible to be from the map ? If I change it manually to zm_deko2, it works fine.

Last edited by nunuxer; 02-13-2021 at 10:11.
nunuxer is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 02-13-2021 , 15:07   Re: Server crashes Run time error 4: index out of bounds
Reply With Quote #2

Most likely missing a connected check or valid player range check on attacker. Probably the map that has the issues also has a way to suicide while the other might not.

Another possibility if your server is 32/32 players is that one or both of g_nemesis[] or g_assassin[] is too small. They should be [33].

It is however impossible to tell with 100% certainty without the declaration of the variables used as array indexes (victim & attacker) and the code in between.
__________________
Black Rose is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-13-2021 , 15:12   Re: Server crashes Run time error 4: index out of bounds
Reply With Quote #3

however the crash reason is not behind the error index out of bounds.

you might have something else.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



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 17:49.


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