Raised This Month: $ Target: $400
 0% 

Displaying call stack trace for plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kikal767
Member
Join Date: Aug 2012
Old 10-23-2012 , 00:59   Displaying call stack trace for plugin
Reply With Quote #1

I have write a new plugins..and I got this error logs

PHP Code:
L 10/23/2012 12:43:05: [SMNative "GetEntPropEnt" reportedProperty "m_jockeyVictim" not found (entity 0/worldspawn)
L 10/23/2012 12:43:05: [SMDisplaying call stack trace for plugin "L4d2_Jockey acid swipe.smx":
L 10/23/2012 12:43:05: [SM]   [0]  Line 79D:\steamapps\common\left 4 dead 2\left4dead2\addons\sourcemod\scripting\L4d2_Jockey Acid Swipe.sp::Event_PlayerHurt() 
PHP Code:
public Action:Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
Jockey GetClientOfUserId(GetEventInt(event"attacker"));
    new 
target GetClientOfUserId(GetEventInt(event"userid"));
    new 
duration GetConVarInt(FindConVar("sm_Jockey_acidswipe_duration"));
    new 
stack GetConVarInt(FindConVar("sm_Jockey_acidswipe_stack"));
    new 
Jockey_Victim GetEntPropEnt(JockeyProp_Send"m_jockeyVictim");
    
    
decl String:weapon[64];
    
GetEventString(event"weapon"weaponsizeof(weapon));
    
    if((
GetClientTeam(target) == 2) && (StrEqual(weapon"jockey_claw")))
    {
        if (
IsValidEntity(Jockey_Victim) && Jockey_Victim != 0)
        {
            return 
Plugin_Continue;
        } else
        {
            
attacker[target] = Jockey;
            if(
hurtsLeft[target] <= 0)
            {
                
hurtsLeft[target] = duration;
                
CreateTimer(1.0Acid_Damagetarget);
            } else
            {
                if(
stack == -1)
                {
                    
hurtsLeft[target] = duration;
                } else
                {
                    if(
stack >= 0)
                    {
                        
hurtsLeft[target] += stack;
                    } else
                    {
                        
//sm_Jockey_acidswipe_stack has invalid value so log error
                        
LogError("sm_Jockey_acidswipe_stack has an invalid value. Accepted values are -1 and higher.");
                    }
                }
            }
        }
    }
    return 
Plugin_Continue;
}

public 
Action:Acid_Damage(Handle:timerany:client)
{
    if(
hurtsLeft[client] <= 0)
    {
        
attacker[client] = 0;
        return;
    } else
    {
        
hurtsLeft[client] -= 1;
    }
    if(
client == 0)
    {
        
attacker[client] = 0;
        
hurtsLeft[client] = 0;
        return;
    }
    if(!
IsClientInGame(client))
    {
        
attacker[client] = 0;
        
hurtsLeft[client] = 0;
        return;
    }
    if(!
IsPlayerAlive(client))
    {
        
attacker[client] = 0;
        
hurtsLeft[client] = 0;
        return;
    }
    if(
GetClientTeam(client) != 2)
    {
        
attacker[client] = 0;
        
hurtsLeft[client] = 0;
        return;
    }
    
#if defined DEBUG
    
    
EmitSoundToClient(ClientAcid_Sound);

    
#endif
    
    
DamageEffect(client);
    
    if(
hurtsLeft[client] > 0)
    {
        
CreateTimer(1.0Acid_Damageclient);
    }
    return;

PHP Code:
public OnMapStart()
{
    
PrecacheSound(Acid_Soundtrue);
}

public 
Action:round_start(Handle:event, const String:name[], bool:dontBroadcast)
{

    if(
timer_handle != INVALID_HANDLE )
                {
                    
KillTimer(timer_handle);
                    
timer_handle=INVALID_HANDLE;
                }
    if(
timer_handle == INVALID_HANDLE)
                {
                    
timer_handle=CreateTimer(GetConVarFloat(sm_Jockey_Msg_time), Msg0TIMER_REPEAT);
                }
}

public 
Action:Event_RoundEnd(Handle:eventString:event_name[], bool:dontBroadcast)
{
    if(
timer_handle != INVALID_HANDLE)
    {
        
KillTimer(timer_handle);
        
timer_handle=INVALID_HANDLE;
    }


Last edited by kikal767; 10-23-2012 at 01:02.
kikal767 is offline
 



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 16:45.


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