AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   invalid entities (https://forums.alliedmods.net/showthread.php?t=173627)

Jasonbourne 12-08-2011 07:39

invalid entities
 
hello,

for the following code

Code:

if (client != INVALID_ENT_REFERENCE)
{
    new iSpecModeUser = GetEntProp(client, Prop_Send,"m_iObserverMode");
}

generates the follwoing in sourcemod error logs

Code:

L 12/08/2011 - 12:25:54: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:54: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:54: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:55: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:55: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:55: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:55: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:55: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:55: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:55: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:55: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:55: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:56: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:56: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:56: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:56: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:56: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:56: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:57: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:57: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:57: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:57: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:57: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:57: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:57: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:57: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:57: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:58: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:58: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:58: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:58: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:58: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:58: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:59: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:59: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:59: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:59: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:59: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:59: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:25:59: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:25:59: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:25:59: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:26:00: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:26:00: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:26:00: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:26:00: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:26:00: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:26:00: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:26:01: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid
L 12/08/2011 - 12:26:01: [SM] Displaying call stack trace for plugin "cPMod.smx":
L 12/08/2011 - 12:26:01: [SM]  [0]  Line 591, C:\Users\<user>\Desktop\sourcemod-1.4.0-windows\addons\sourcemod\scripting\cPMod.sp::Timer_UpdateHudHint()
L 12/08/2011 - 12:26:01: [SM] Native "GetEntProp" reported: Entity 1 (1) is invalid

how can i fix this

im new to coding

ive tried searching the forums and google to no avail

that is only a small portion of the error logs which take up about 80 mb per day

the invalid entity also chnages // not always 1

thetwistedpanda 12-08-2011 07:45

Re: invalid entities
 
Please provide the full code that is giving you that error; can't do anything with what you provided other than say dirty things about you :3.

Bacardi 12-08-2011 07:46

Re: invalid entities
 
PHP Code:

if(client != && IsClientInGame(client)) 

Try this

Jasonbourne 12-08-2011 08:05

Re: invalid entities
 
Quote:

Originally Posted by Bacardi (Post 1609630)
PHP Code:

if(client != && IsClientInGame(client)) 

Try this

thanks you will test it now

is there a way to limit the size of the log files sm makes ?

because its hard to handle these 50-mb + files

Bacardi 12-08-2011 12:33

Re: invalid entities
 
Better fix those errors, then you don't have to handle big log files... right ?
Still, what @thetwistedpanda mention, better show whole code, not a snip of that.
I hate guess answers because "error" could somewhere else also. (I hate english :P)

Jasonbourne 12-08-2011 17:27

Re: invalid entities
 
Quote:

Originally Posted by Bacardi (Post 1609797)
Better fix those errors, then you don't have to handle big log files... right ?
Still, what @thetwistedpanda mention, better show whole code, not a snip of that.
I hate guess answers because "error" could somewhere else also. (I hate english :P)

issue resolved

thanks for you help


All times are GMT -4. The time now is 11:05.

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