View Single Post
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-24-2014 , 08:36   Re: [L4D2] Getting Crashes From Plugin
Reply With Quote #2

I'm guess, you are trying mess entities, which are "flushed" on map start.
And you are using EntityRef wrong way.

Entity References (SourceMod)
PHP Code:
callback(entity)
{
    
CreateTimer(5.0delayEntIndexToEntRef(entity));
}

public 
Action:delay(Handle:timerany:ref)
{
    new 
entity EntRefToEntIndex(ref);

    if(
entity == INVALID_ENT_REFERENCE)
    {
        return;
    }

    
// Do math


Code:
SetEntDataFloat(entity, laggedMovementOffset, 1.0*iSpeed);

Not need find offsets...
SetEntPropFloat(entity, Prop_Data, "m_flLaggedMovementValue", 1.0*iSpeed);
*edit
And you are storing timer to very big array "CommonSpawnTimer" ? You are using entity index as array index...

*edit
and you are using KillTImer in Timer callback...

Last edited by Bacardi; 04-24-2014 at 08:41.
Bacardi is offline