Raised This Month: $ Target: $400
 0% 

Error in code Need Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
asdfdsdf
AlliedModders Donor
Join Date: Aug 2010
Location: Belgium
Old 11-07-2013 , 08:12   Error in code Need Help
Reply With Quote #1

I have a few errors but i dont know whats wrong can someone help me with this here are errors and codes


Errors;
PHP Code:
[AMXXDisplaying debug trace (plugin "Jailbreak_Lastrequest.amxx")
L 11/07/2013 13:54:14: [AMXXRun time error 4index out of bounds 
L 11
/07/2013 13:54:14: [AMXX]    [0colorchat.inc::ColorChat (line 80)
L 11/07/2013 13:54:14: [AMXX]    [1Jailbreak_Lastrequest.sma::Handler_PlayerList (line 421)
L 11/07/2013 13:54:25: [AMXXDisplaying debug trace (plugin "Jailbreak_Lastrequest.amxx")
L 11/07/2013 13:54:25: [AMXXRun time error 4index out of bounds 
L 11
/07/2013 13:54:25: [AMXX]    [0colorchat.inc::ColorChat (line 80)
L 11/07/2013 13:54:25: [AMXX]    [1Jailbreak_Lastrequest.sma::EventSpray (line 648)
L 11/07/2013 13:54:29: [AMXXDisplaying debug trace (plugin "Jailbreak_Lastrequest.amxx")
L 11/07/2013 13:54:29: [AMXXRun time error 4index out of bounds 
L 11
/07/2013 13:54:29: [AMXX]    [0colorchat.inc::ColorChat (line 80)
L 11/07/2013 13:54:29: [AMXX]    [1Jailbreak_Lastrequest.sma::EventSpray (line 648)
L 11/07/2013 13:54:42: [AMXXDisplaying debug trace (plugin "Jailbreak_Lastrequest.amxx")
L 11/07/2013 13:54:42: [AMXXRun time error 4index out of bounds 
L 11
/07/2013 13:54:42: [AMXX]    [0colorchat.inc::ColorChat (line 80)
L 11/07/2013 13:54:42: [AMXX]    [1Jailbreak_Lastrequest.sma::Ham_PlayerKilled (line 248


PHP Code:
[public Ham_PlayerKilled(idiAttackerhmm) {
    if((
id == Players[0] || id == Players[1])) {
        new 
szName[2][32]
        
get_user_name((id == Players[0]) ? Players[1] : Players[0], szName[0], 31)
        
get_user_name((id == Players[0]) ? Players[0] : Players[1], szName[1], 31)
        
        new 
plrid = (id == Players[0]) ? Players[1] : Players[0]
        
        
ColorChat(0GREY"^x04%s^x03 %s^x01 won the^x03 %s^x01 vs^x03 %s^x01."TAGszName[0], Lr_Names[LrType], szName[1])
        
        if( 
ac_get_player_statusplrid ) == LOADED && !ac_hasplridg_iAcTheProfessional ) )
        {
            if( 
ac_set_valueplridg_iAcTheProfessionalINCREASE) >= 50 )
            {
                
ac_giveplridg_iAcTheProfessional )
                
                
jbshop_set_cashplridjbshop_get_cashplrid ) + 5000 )
            }
        }
        
        
jbshop_set_cash((id == Players[0]) ? Players[1] : Players[0], (jbshop_get_cash((id == Players[0]) ? Players[1] : Players[0]) + 250))
        
        
LastRequest_Stop()
    }

PHP Code:
public EventSpray( ) {
    if(
Running && LrType == Spray) {
        new 
iOrigin];
        
iOrigin] = read_data);
        
iOrigin] = read_data);
        
iOrigin] = read_data);
        
        new 
Float:vecSprayOrigin];
        
IVecFVeciOriginvecSprayOrigin );
        
        new 
iPlayer read_data);
        if(
iPlayer != Players[0] && iPlayer != Players[1])
            return 
PLUGIN_CONTINUE
        
        
new Float:vecPlayerOrigin];
        
get_user_originiPlayeriOrigin);
        
IVecFVeciOriginvecPlayerOrigin );
        
        new 
Float:vecDirection];
        
xs_vec_subvecSprayOriginvecPlayerOriginvecDirection );
        
        
xs_vec_mul_scalarvecDirection10.0 vector_lengthvecDirection ), vecDirection );
        
        new 
Float:vecStop];
        
xs_vec_addvecSprayOriginvecDirectionvecStop );
        
xs_vec_mul_scalarvecDirection, -1.0vecDirection );
        
        new 
Float:vecStart];
        
xs_vec_addvecSprayOriginvecDirectionvecStart );
        
        
engfuncEngFunc_TraceLinevecStartvecStopIGNORE_MONSTERS, -1);
        
        
get_tr20TR_vecPlaneNormalvecDirection );
        
        
vecDirection] = 0.0;
        
        
xs_vec_mul_scalarvecDirection5.0 vector_lengthvecDirection ), vecDirection );
        
xs_vec_addvecSprayOriginvecDirectionvecStart );
        
xs_vec_copyvecStartvecStop );
        
vecStop] -= 9999.0;
        
        
engfuncEngFunc_TraceLinevecStartvecStopIGNORE_MONSTERS, -1);
        
        
get_tr20TR_vecEndPosvecStop );
    
        new 
szName32 ]; get_user_nameiPlayerszNamecharsmaxszName ) );
        
        
SprayDistance[iPlayer] = ( vecStart] - vecStop] );
        
ColorChat(0GREY"^x04%s^x03 %s^x01:^x03 %s^x01 sprayed^x03 %f^x01 units."TAGLr_Names[LrType], szNameSprayDistance[iPlayer])
        
        if(
SprayDistance[Players[0]] != 0.0 && SprayDistance[Players[1]] != 0.0) {
            if(
SprayDistance[Players[0]] == SprayDistance[Players[1]]) {
                
ColorChat(0GREY"^x04%s^x03 %s^x01: Tie! Spray again."TAGLr_Names[LrType])
                
SprayDistance[Players[0]] = 0.0;
                
SprayDistance[Players[1]] = 0.0;
            }
            else {
                new 
Playerz = (SprayDistance[Players[0]] > SprayDistance[Players[1]]) ? Players[0] : Players[1]
                
get_user_namePlayerzszNamecharsmaxszName ) );
                
ColorChat(0GREY"^x04%s^x03 %s^x01 sprayed the highest (^x03 %f^x01)!"TAGszNameSprayDistance[Playerz])
            }
        }
    }
    return 
PLUGIN_CONTINUE;    

asdfdsdf 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 23:19.


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