Raised This Month: $51 Target: $400
 12% 

Error in code Need Help


Post New Thread Reply   
 
Thread Tools Display Modes
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
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 11-07-2013 , 08:36   Re: Error in code Need Help
Reply With Quote #2

Show your ColorChat Stock..
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then
devilicioux is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-07-2013 , 08:57   Re: Error in code Need Help
Reply With Quote #3

check this: Lr_Names[LrType]
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
asdfdsdf
AlliedModders Donor
Join Date: Aug 2010
Location: Belgium
Old 11-07-2013 , 13:08   Re: Error in code Need Help
Reply With Quote #4

@devilicioux
what do you mean

@^SmileY
huh man im noob in coding can you maybe give some more info xD
asdfdsdf is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-07-2013 , 19:27   Re: Error in code Need Help
Reply With Quote #5

Quote:
Originally Posted by asdfdsdf View Post
@devilicioux
what do you mean

@^SmileY
huh man im noob in coding can you maybe give some more info xD
So, post full code
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 11-08-2013 , 01:59   Re: Error in code Need Help
Reply With Quote #6

Quote:
Originally Posted by ^SmileY View Post
So, post full code
He doesnt need to post the full code
Just download chatcolor.inc and colorchat.amxx
And use chatcolor.inc insted of colorchat.inc when you compile
And out colorchat.amxx in plugin
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
asdfdsdf
AlliedModders Donor
Join Date: Aug 2010
Location: Belgium
Old 11-08-2013 , 04:51   Re: Error in code Need Help
Reply With Quote #7

Quote:
Originally Posted by ironskillz1 View Post
He doesnt need to post the full code
Just download chatcolor.inc and colorchat.amxx
And use chatcolor.inc insted of colorchat.inc when you compile
And out colorchat.amxx in plugin

Thx mate didnt know that i compiled it now with chatcolor
asdfdsdf is offline
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 02:57.


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