Raised This Month: $ Target: $400
 0% 

index out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
outsiderlv
Senior Member
Join Date: Mar 2010
Old 12-01-2010 , 11:50   index out of bounds
Reply With Quote #1

PHP Code:
public fm_FEFindEntityInSphere(startFloat:origin[3], Float:radius)
{
    if( 
radius!=1500.0 || old_gametime!=get_gametime() )
        return 
FMRES_IGNORED;
    
    static 
hittraceFloat:user_origin[3], Float:absmax[3], Float:fraction;
    
hit start;
    
    
// run the same check to see what its result will be
    
while( (hit=engfunc(EngFunc_FindEntityInSpherehitoriginradius))>)
    {
        if(
no_flash[hit]) {
            
// hit a non- or dead-player
            
if( !is_user_alive(hit) )
            {
                
forward_return(FMV_CELLhit);
                return 
FMRES_SUPERCEDE;
            }
            
            
// aim for the body eyes
            
pev(hitpev_originuser_origin);
            
pev(hitpev_absmaxabsmax);
            
user_origin[2] = (absmax[2]-20.0);
            
engfunc(EngFunc_TraceLineoriginuser_originDONT_IGNORE_MONSTERS0trace);
            
            
// hit player eyes, grenade ok
            
if( get_tr2(traceTR_pHit)==hit )
            {
                
// start backup check (de_dust2 B bug - outmap bug)
                
engfunc(EngFunc_TraceLineuser_originoriginDONT_IGNORE_MONSTERShittrace);
                
                
// hit player eyes with backup check
                
get_tr2(traceTR_flFractionfraction);
                if( 
fraction==1.0 )
                {
                    if(
owner) {
                        
forward_return(FMV_CELL, -1);
                        return 
FMRES_SUPERCEDE;
                    }
                }
            }
        }
    }
    
    
// grenade could not hit anyones eyes, cancel the check
    
forward_return(FMV_CELL, -1);
    return 
FMRES_SUPERCEDE;

Where is the problem? Debug says that the problem is on line witch contains only "{".
outsiderlv 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 11:17.


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