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

Error with INS SM Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ozrich
AlliedModders Donor
Join Date: Oct 2015
Old 01-09-2017 , 10:35   Error with INS SM Plugin
Reply With Quote #1

Hi Folks,

I'm not a good coder. In fact, I only understand the basics so wanted some help.

I'm using Daimyo21's Insurgency plugin and receive the below error in console:

L 01/08/2017 - 04:29:47: [SM] Exception reported: Client index 0 is invalid
L 01/08/2017 - 04:29:47: [SM] Blaming: c_dy_respawn_naong.smx
L 01/08/2017 - 04:29:47: [SM] Call stack trace:
L 01/08/2017 - 04:29:47: [SM] [0] GetClientTeam
L 01/08/2017 - 04:29:47: [SM] [1] Line 6201, <drive\path\>c_dy_respawn_naong.sp::GrenadeSc reamCheckTimer

I understand I could comment it out, and it appears to work, I don't know, but would like to fix it.
Attached Files
File Type: sp Get Plugin or Get Source (c_dy_respawn_naong.sp - 144 views - 222.7 KB)
__________________
ozrich is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-09-2017 , 20:39   Re: Error with INS SM Plugin
Reply With Quote #2

Client index 0 is always the console. It's never a client.

I see multiple checks to make sure the client is valid and is not 0...yet the thing still fired off with an error.

Actually, it could possibly be GetClientTeam(owner) == 3. Try uncommenting things out to bring the plugin back to normal functions, then change line 6201 from

PHP Code:
if (client && IsPlayerAlive(client) && GetClientTeam(client) == && GetClientTeam(owner) == 3
to

PHP Code:
if (client && IsPlayerAlive(client) && GetClientTeam(client) == /* && GetClientTeam(owner) == 3*/
Compile and give it a try. I'm wondering if it's line 6108 (owner = GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity");) that is setting the owner of the entity to index 0 for some reason.

Last edited by 404UserNotFound; 01-09-2017 at 20:39.
404UserNotFound is offline
ozrich
AlliedModders Donor
Join Date: Oct 2015
Old 01-10-2017 , 10:48   Re: Error with INS SM Plugin
Reply With Quote #3

Thanks the error no longer appears.

Is it ok to leave this commented out? I'm assuming the owner is the server (client index 0 as you say) thus giving the error and doesn't need to be there?
__________________
ozrich is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-10-2017 , 12:19   Re: Error with INS SM Plugin
Reply With Quote #4

It *should* be safe to leave commented out.

You could always go the experimental route and try something like this...

PHP Code:
if (client && IsPlayerAlive(client) && GetClientTeam(client) == && owner && GetClientTeam(owner) == 3
All I've done here is added "owner > 0". Not sure if this'll help or hurt, but it's always worth a shot.

If it gets worse, you can always remove "owner > 0" and leave GetClientTeam(owner) commented out.

Last edited by 404UserNotFound; 01-10-2017 at 12:21.
404UserNotFound is offline
ozrich
AlliedModders Donor
Join Date: Oct 2015
Old 01-11-2017 , 01:03   Re: Error with INS SM Plugin
Reply With Quote #5

Thanks, I'll try that and let you know.
__________________
ozrich is offline
ozrich
AlliedModders Donor
Join Date: Oct 2015
Old 01-15-2017 , 00:25   Re: Error with INS SM Plugin
Reply With Quote #6

Thanks for all your help, that worked.

Just one last error I'm receiving AFAIK. I contacted the developer of the plugin and he said he can't see any issues... Updated source attached.

L 01/14/2017 - 15:40:00: [SM] Exception reported: Client index 560163172 is invalid
L 01/14/2017 - 15:40:00: [SM] Blaming: c_dy_respawn_naong new new.smx
L 01/14/2017 - 15:40:00: [SM] Call stack trace:
L 01/14/2017 - 15:40:00: [SM] [0] PrintToChat
L 01/14/2017 - 15:40:00: [SM] [1] Line 3683, D:\Insurgency Server\Insurgency-dy-sourcemod-c51a2fdbae8d1fe32675a5623f3ebe6b8ecd6bf2\scri pting\c_dy_respawn_naong new new.sp::Event_PlayerDeath
L 01/14/2017 - 15:40:00: [SM] [3] ForcePlayerSuicide
L 01/14/2017 - 15:40:00: [SM] [4] Line 1631, D:\Insurgency Server\Insurgency-dy-sourcemod-c51a2fdbae8d1fe32675a5623f3ebe6b8ecd6bf2\scri pting\c_dy_respawn_naong new new.sp::Timer_CheckEnemyStatic
Attached Files
File Type: sp Get Plugin or Get Source (c_dy_respawn_naong new new.sp - 119 views - 223.0 KB)
__________________
ozrich is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 01-15-2017 , 02:05   Re: Error with INS SM Plugin
Reply With Quote #7

Quote:
Originally Posted by ozrich View Post
Thanks for all your help, that worked.

Just one last error I'm receiving AFAIK. I contacted the developer of the plugin and he said he can't see any issues... Updated source attached.

L 01/14/2017 - 15:40:00: [SM] Exception reported: Client index 560163172 is invalid
L 01/14/2017 - 15:40:00: [SM] Blaming: c_dy_respawn_naong new new.smx
L 01/14/2017 - 15:40:00: [SM] Call stack trace:
L 01/14/2017 - 15:40:00: [SM] [0] PrintToChat
L 01/14/2017 - 15:40:00: [SM] [1] Line 3683, D:\Insurgency Server\Insurgency-dy-sourcemod-c51a2fdbae8d1fe32675a5623f3ebe6b8ecd6bf2\scri pting\c_dy_respawn_naong new new.sp::Event_PlayerDeath
L 01/14/2017 - 15:40:00: [SM] [3] ForcePlayerSuicide
L 01/14/2017 - 15:40:00: [SM] [4] Line 1631, D:\Insurgency Server\Insurgency-dy-sourcemod-c51a2fdbae8d1fe32675a5623f3ebe6b8ecd6bf2\scri pting\c_dy_respawn_naong new new.sp::Timer_CheckEnemyStatic
Try changing line 3538 to
PHP Code:
// Check client valid
if (!IsValidClient(client)) return Plugin_Continue
It is currently:
PHP Code:
// Check client valid
if (!IsClientInGame(client)) return Plugin_Continue
Which can allow invalid client indexes. I assume IsValidClient() is defined in your includes, since it isnt in the code provided, and I assume it checks for IsClientInGame AND for valid client indexes. If so, that change should fix your error.
__________________
ThatOneGuy is offline
ozrich
AlliedModders Donor
Join Date: Oct 2015
Old 01-15-2017 , 06:37   Re: Error with INS SM Plugin
Reply With Quote #8

Thanks for your help, I did that and I'm receiving the below errors (which I don't think I was receiving before). The error lines were for 3683 and 1631 but you mentioned to change 3538. Just confirming that was correct?

L 01/15/2017 - 10:195: [SM] Exception reported: Array index is out of bounds
L 01/15/2017 - 10:195: [SM] Blaming: c_dy_respawn_naong new new.smx
L 01/15/2017 - 10:195: [SM] Call stack trace:
L 01/15/2017 - 10:195: [SM] [1] Line 2117, D:\Insurgency Server\Insurgency-dy-sourcemod-c51a2fdbae8d1fe32675a5623f3ebe6b8ecd6bf2\scri pting\c_dy_respawn_naong new new.sp::CheckSpawnPointPlayers
L 01/15/2017 - 10:195: [SM] [2] Line 2241, D:\Insurgency Server\Insurgency-dy-sourcemod-c51a2fdbae8d1fe32675a5623f3ebe6b8ecd6bf2\scri pting\c_dy_respawn_naong new new.sp::Event_Spawn
__________________
ozrich is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 01-15-2017 , 11:56   Re: Error with INS SM Plugin
Reply With Quote #9

Yes, and now you have a new error. That plugin is just really buggy. Why not send it back to the original coder?
__________________
ThatOneGuy is offline
ozrich
AlliedModders Donor
Join Date: Oct 2015
Old 01-15-2017 , 14:53   Re: Error with INS SM Plugin
Reply With Quote #10

I suspected that was the case but the code doesn't feel there's anything wrong with it.
__________________
ozrich 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 07:09.


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