Raised This Month: $ Target: $400
 0% 

run time eror


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dineizen
Junior Member
Join Date: May 2011
Old 11-07-2011 , 17:41   run time eror
Reply With Quote #1

L 11/08/2011 - 00:46:25: [AMXX] Displaying debug trace (plugin "Jail1.amxx") L 11/08/2011 - 00:46:25: [AMXX] Run time error 10: native error (native "cs_get_user_team") L 11/08/2011 - 00:46:25: [AMXX] [0] Jail1.sma::client_damage (line 2607)

PHP Code:
public client_damage(victimentidattackerFloat:damagedamagebits

    if (
g_rebel[attacker] == true)  
    { 
        return 
PLUGIN_HANDLED
    } 
    
    new 
name_t[32
    
get_user_name(attackername_t31
    if(
cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT
    {     
        
g_rebel[attacker] = true 
        ColorChat
(0RED"^4[ ^1Extreme^4 ]^4 Prisoner ^1%s^4 is a rebel!"name_t
    } 
    return 
PLUGIN_HANDLED

This the line with problem
if(cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
what to do how i fix this line
dineizen is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-07-2011 , 19:25   Re: run time eror
Reply With Quote #2

I think you may need to check if the attacker is connected first.
__________________

Last edited by fysiks; 11-07-2011 at 19:25.
fysiks is offline
dineizen
Junior Member
Join Date: May 2011
Old 11-08-2011 , 06:55   Re: run time eror
Reply With Quote #3

if(is_user_connected(attacker)
??
dineizen is offline
Blue Snake.
Member
Join Date: May 2011
Location: Romania
Old 11-08-2011 , 11:43   Re: run time eror
Reply With Quote #4

PHP Code:
if ( !is_user_connected(attacker) )
    return 
PLUGIN_HANDLED 

Last edited by Blue Snake.; 11-08-2011 at 11:44.
Blue Snake. 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 14:27.


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