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

Entity is invalid


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ellie
Senior Member
Join Date: Apr 2013
Old 03-07-2020 , 12:50   Entity is invalid
Reply With Quote #1

Hi. I'm using a L4D2 plugin that keeps reporting hundreds of the same error in the log. This:


Code:
L 03/07/2020 - 10:36:46: [SM] Exception reported: Entity 3 (3) is invalid
L 03/07/2020 - 10:36:46: [SM] Blaming: lastboss.smx
L 03/07/2020 - 10:36:46: [SM] Call stack trace:
L 03/07/2020 - 10:36:46: [SM]   [0] GetEntDataVector
L 03/07/2020 - 10:36:46: [SM]   [1] Line 903, D:\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\lastboss.sp::AddVelocity
L 03/07/2020 - 10:36:46: [SM]   [2] Line 768, D:\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\lastboss.sp::JumpingTimer
These are the sections the plugin is complaning about:

Code:
public Action:JumpingTimer(Handle:timer)
{
	if(form_prev == FORMFOUR && idBoss)
		AddVelocity(idBoss, GetConVarFloat(sm_lastboss_jumpheight_forth));
	else
		KillTimer(timer);
}

public AddVelocity(client, Float:zSpeed)
{
	if(g_iVelocity == -1) return;
	
	new Float:vecVelocity[3];
	GetEntDataVector(client, g_iVelocity, vecVelocity);
	vecVelocity[2] += zSpeed;
	
	TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vecVelocity);
}
How can this be fixed? I would ask in the original thread, but the plugin author hasn't posted anything in the past 9 years.
Ellie is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 03-07-2020 , 13:51   Re: Entity is invalid
Reply With Quote #2

Just give us the plugin link. We need more info from the source code.
__________________
Ilusion9 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-07-2020 , 14:00   Re: Entity is invalid
Reply With Quote #3

It's ztar's lastboss: https://forums.alliedmods.net/showthread.php?t=129013

Fast fix may be:
Code:
if(form_prev == FORMFOUR && idBoss)
=>
Code:
if( form_prev == FORMFOUR && idBoss && idBoss != DEAD && IsClientInGame(idBoss) && GetEntProp(idBoss, Prop_Send, "m_zombieClass") == CLASS_TANK )
BTW, what game do you use it on?
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 03-07-2020 at 14:03.
Dragokas is offline
Ellie
Senior Member
Join Date: Apr 2013
Old 03-09-2020 , 23:56   Re: Entity is invalid
Reply With Quote #4

Yes, that's the one. And I use it on both L4Ds. That error is making the logs unnecessarily large. I will try your suggestion now and report back. Thanks.


Edit:
Well people have been playing fo the past two days and that error hasn't appered again. That seems to have solved it. Thanks Drogakas

Last edited by Ellie; 03-11-2020 at 20:22. Reason: Follow up.
Ellie 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 19:38.


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