Raised This Month: $ Target: $400
 0% 

index out of bounds problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Meelo
Member
Join Date: Aug 2010
Old 01-13-2021 , 09:21   index out of bounds problem
Reply With Quote #1

Hello, i need help to repair this error

L 01/13/2021 - 133:44: [AMXX] Run time error 4: index out of bounds
L 01/13/2021 - 133:44: [AMXX] [0] ranticheat.sma:layer_PostThink (line 479)

Code:
public Player_PostThink( id ) {
	if( !is_user_alive( id ) || pev( id, pev_flags ) & FL_FROZEN || pev( id, pev_maxspeed ) < 210.0 || pev( id, pev_maxspeed ) > 260 || ( get_user_team( id ) != 1 && get_user_team( id ) != 2 )
	|| is_user_bot( id ) || bPluginPause || bBanned[id] )
		return;
	
	/*&& pev( id, pev_button ) & IN_DUCK*/ /*|| pev( id, pev_movetype ) & ( MOVETYPE_FLY | MOVETYPE_NOCLIP )*/ 
	
	static buttons, oldbuttons[33];
	buttons = pev( id, pev_button );
	
	static Float:MovementSqroot;
	MovementSqroot = floatsqroot( flForwardMove[id] * flForwardMove[id] + flSideMove[id] * flSideMove[id] );
	
	// Check FPS
	static fpsdet[33];
	
	if( UserFPS[id] > 101.0 || UserFPS[id] <= 19.89 ) {
		if( ++fpsdet[id] >= 100 ) {
			new name[32], SteamID[32], IPaddr[32];
			get_user_name( id, name, charsmax( name ) );
			get_user_authid( id, SteamID, charsmax( SteamID ) );
			get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );
			
			fpsdet[id] = 0;
			
			log_to_file( "rAntiCheat.log", "FPS %f detected on player %s, IP: %s, SteamID: %s", UserFPS[id], name, IPaddr, SteamID );
			
			bBanned[id] = true;
			
			//server_cmd( "amx_mban #%d 120 ^"[^x03rAnti-Cheat^x01] FPS %.2f detected!^"", get_user_userid( id ), UserFPS[id] );
		}
	} else
		fpsdet[id] = 0;
	// ---------------------
	
	static Float:fSpeed[3];
	pev( id, pev_velocity, fSpeed );
	
	if( UserFPS[id] > 48.0 && UserFPS[id] < 101.0 ) {
		AVGFPS[id][0] += UserFPS[id];
		++AVGFPS[id][1];
	}
	
	// JB detection
	if( bWouldTakeDMG[id] ) {
		if( distance_to_ground( id ) < ( fSpeed[2] / -10.0 ) ) {	
			averagefps[id] += UserFPS[id];
			FPSToAverage[id][averagefpsnum[id]] = UserFPS[id];
			DistToAvg[id][averagefpsnum[id]] = distance_to_ground( id );
			++averagefpsnum[id];
		}
Line 479:
Code:
FPSToAverage[id][averagefpsnum[id]] = UserFPS[id];

Last edited by Meelo; 01-13-2021 at 09:22.
Meelo is offline
 


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 14:06.


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