View Single Post
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 12-04-2020 , 09:15   Re: [L4D(2)] SuperVersus [1.5.4]
Reply With Quote #1323

Reporting error on Superversus of Shao version. (but seems that all versions can throw this error).

Is really rare to happen, the user may have to disconnect less than 1 second after the "tank_spawn"
It has thrown only once in my servers.

Code:
Exception reported: Entity 6 (6) is invalid
Blaming: l4d_superversus.smx
Call stack trace:
  [0] SetEntProp
  [1] Line 527, l4d_superversus.sp::SetTankHp
To fix it, change these parts here:

Event_TankSpawn
PHP Code:
public Action Event_TankSpawn(Event event, const char[] namebool dontBroadcast)
{
    if(
AutoDifficulty.BoolValueCreateTimer(1.0SetTankHpevent.GetInt("userid"), TIMER_FLAG_NO_MAPCHANGE );

and

SetTankHp
PHP Code:
public Action SetTankHp(Handle hTimerint userid)
{
    
int client GetClientOfUserId(userid);
    
    if (
client == 0)
        return;
        
    
SetEntProp(client,Prop_Send,"m_iHealth"TankHealth.IntValue);
    
SetEntProp(client,Prop_Send,"m_iMaxHealth"TankHealth.IntValue);
    
SetEntityHealth(clientTankHealth.IntValue);

__________________

Last edited by Marttt; 02-22-2021 at 19:21.
Marttt is offline