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

PrintToChat - Client index 0 is invalid


Post New Thread Reply   
 
Thread Tools Display Modes
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-03-2010 , 13:07   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #11

My argument stands.
AtomicStryker is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 09-03-2010 , 13:20   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #12

Quote:
Originally Posted by AtomicStryker View Post
My argument stands.
Did you ignore what retsam said? You shouldn't code to support listen servers.
noodleboy347 is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 09-03-2010 , 13:26   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #13

A lot of the functions simply don't support the 0 client index.
Nothing we can do about it. All we can do is prevent the plugin from crashing if a 0 client occurs. We can't tell the function to "DO IT ANYWAY". They're lazy like that.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 09-03-2010 , 15:24   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #14

Quote:
Originally Posted by Monkeys View Post
A lot of the functions simply don't support the 0 client index.
Nothing we can do about it. All we can do is prevent the plugin from crashing if a 0 client occurs. We can't tell the function to "DO IT ANYWAY". They're lazy like that.
0 isn't a client index, it means the command originated from server console (like with dedicated servers). The host usually has a client index of 1. Though I've ran into having a higher client index when bots were configured to join before human players, but can't reproduce it since the OB update. Maybe it was fixed.

Just throwing this out there: would it be completely disastrous if SourceMod changed all "client 0" indexes internally to the host index if the server was a listen one?
__________________
plop
p3tsin is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 09-03-2010 , 15:55   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #15

Quote:
Originally Posted by p3tsin View Post
0 isn't a client index, it means the command originated from server console (like with dedicated servers). The host usually has a client index of 1. Though I've ran into having a higher client index when bots were configured to join before human players, but can't reproduce it since the OB update. Maybe it was fixed.

Just throwing this out there: would it be completely disastrous if SourceMod changed all "client 0" indexes internally to the host index if the server was a listen one?
I know it's not a client index, but the functions treat whatever we give as if it's a client index. Even if we give 'em 0.

I'm sure the devs have a reason for not doing it. Be it safety, be it anything, nothing much we can do.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-03-2010 , 20:02   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #16

Quote:
Originally Posted by noodleboy347 View Post
Did you ignore what retsam said? You shouldn't code to support listen servers.
Quote:
Originally Posted by myself
Because if you don't, people will keep reporting "bugs" related to 0 client errors.
AtomicStryker is offline
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 09-03-2010 , 23:12   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #17

you code it to tell the player "client 0 is bad, quit using listen servers and download srcds."
dirka_dirka is offline
mi123645
Veteran Member
Join Date: Feb 2009
Old 09-03-2010 , 23:31   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #18

AtomicStryker is right. It's not like listenservers rape your dog and maul your cat, just have the plugin ignore client 0.

Quote:
0 isn't a client index, it means the command originated from server console (like with dedicated servers). The host usually has a client index of 1. Though I've ran into having a higher client index when bots were configured to join before human players, but can't reproduce it since the OB update. Maybe it was fixed.

Just throwing this out there: would it be completely disastrous if SourceMod changed all "client 0" indexes internally to the host index if the server was a listen one?
Sounds like a good idea.
mi123645 is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 09-04-2010 , 02:05   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #19

Well, I dont run listen servers, but I always thought the host was client "0" on listens, if its not, then its a moot point.. The point was, if you run a type of server where client 0 is actually in game, you will have serious problems with most plugins. Client 0 should always be filtered.
__________________
retsam is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 09-04-2010 , 09:03   Re: PrintToChat - Client index 0 is invalid
Reply With Quote #20

No, on listen server host has client index of 1 but his console has index of 0.
FaTony 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 17:25.


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