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

MOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 04-01-2005 , 09:39  
Reply With Quote #11

I've had problems with the network strings as they don't update properly before the message arrives on the client so they are always out of sync.

So initially I setup some network strings with defaults of 'Init' for statsme, top(x). The user types statsme or topx, I update the network strings to reflect the current information then send the message to display the panel but it shows the last iteration of update i.e in the first case 'Init' is displayed.

I ended up just using the basic ShowMenu command or for hl2mp using the helpers interface.

The only way round this it seems is to pre-cache all the information on a per user basis which is a problem as there are only 128 strings maximum allowed (bearing other plugins in mind).

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 04-01-2005 , 10:04  
Reply With Quote #12

I havent seen this happen to me yet..but thanks I will start looking for it...

If I fire one bullet and hits stats it shows that..
if I fire a second and hits stats it now shows 2 fired
via the infopanel.

Ill ask people if they see this behavior or anything of this nature..
thanks for the headsup.
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 04-01-2005 , 10:26  
Reply With Quote #13

Quote:
Originally Posted by BeetleFart
I havent seen this happen to me yet..but thanks I will start looking for it...

If I fire one bullet and hits stats it shows that..
if I fire a second and hits stats it now shows 2 fired
via the infopanel.

Ill ask people if they see this behavior or anything of this nature..
thanks for the headsup.
I tested a while ago using something like this which produced these results though I think I changed it to SetString as the network string is already created with a dummy message..

Code:
void	DrawPanel(MRecipientFilter *mrf, char *panel_title, char *network_string, char *message, int message_length)
{
	// Update network string first
	if (!g_pStringTableManiScreen) return;

	g_pStringTableManiScreen->AddString(network_string, message_length + 1, message);

	msg_buffer = engine->UserMessageBegin(mrf, vgui_message_index);
   
	msg_buffer->WriteString("info"); // menu name
	msg_buffer->WriteByte(1);
	msg_buffer->WriteByte(3);

	msg_buffer->WriteString("title");
	msg_buffer->WriteString(panel_title);

	msg_buffer->WriteString("type");
	msg_buffer->WriteString("2");

	msg_buffer->WriteString("msg");
	msg_buffer->WriteString(network_string);

	engine->MessageEnd();

}
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 04-01-2005 , 17:27  
Reply With Quote #14

Yeah, they do need time to sync. fysh delays when he sets the string and shows the panel by .5 seconds or something, but I'm trying to find some way to invalidate the string table to force a sync. This probably aint gonna happen :/
__________________
Avoid like the plague.
vancelorgin is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 04-02-2005 , 06:45  
Reply With Quote #15

Quote:
Originally Posted by vancelorgin
Yeah, they do need time to sync. fysh delays when he sets the string and shows the panel by .5 seconds or something, but I'm trying to find some way to invalidate the string table to force a sync. This probably aint gonna happen :/
This is what makes it complicated as from having just a couple of panel strings for both statsme and topx, I now need one for each user If I'm going to use a delay between the player typing statsme and their stats appearing. If I only use 1 string for statsme and two players type 'statsme' at the same time, one player is going to see the wrong stats information

Mani.
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 04-02-2005 , 09:25  
Reply With Quote #16

Quote:
Originally Posted by Mani
This is what makes it complicated as from having just a couple of panel strings for both statsme and topx, I now need one for each user If I'm going to use a delay between the player typing statsme and their stats appearing. If I only use 1 string for statsme and two players type 'statsme' at the same time, one player is going to see the wrong stats information
Yepp, netstrings are for static information (as specified by Valve). Using netstrings also result in a lot of traffic as all messages are sent to all players (20 players result in 20 * 20 = 400 messages sent if you have player specific strings, at best). I'm not sure if only the netstring itself is sent or the complete string table which would be even worse.

/X
XAD is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 04-02-2005 , 10:33  
Reply With Quote #17

Quote:
Originally Posted by XAD
Quote:
Originally Posted by Mani
This is what makes it complicated as from having just a couple of panel strings for both statsme and topx, I now need one for each user If I'm going to use a delay between the player typing statsme and their stats appearing. If I only use 1 string for statsme and two players type 'statsme' at the same time, one player is going to see the wrong stats information
Yepp, netstrings are for static information (as specified by Valve). Using netstrings also result in a lot of traffic as all messages are sent to all players (20 players result in 20 * 20 = 400 messages sent if you have player specific strings, at best). I'm not sure if only the netstring itself is sent or the complete string table which would be even worse.

/X
I know which is why I didn't put it in a release, all commented out atm.

Mani

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 04-03-2005 , 22:26  
Reply With Quote #18

I'm 90% sure the panel, once shown, won't update should the string change, so just queue the requests up and delay if we can't figure out how to invalidate the mother fucker.

vancelorgin

vancelorgin

vancelorgin
__________________
Avoid like the plague.
vancelorgin is offline
fysh
Senior Member
Join Date: Oct 2004
Old 04-03-2005 , 23:06  
Reply With Quote #19

I think it might already be updating as fast as it can. I think player info like ping/name/score/etc for client scoreboards is stored in string tables and those seem to update immediately.

fyshfyshfyshfysh
fyshfyshfyshfyshfyshfyshfyshfysh
fyshfyshfyshfyshfyshfyshfyshfyshfyshfysh
fyshfyshfyshfyshfyshfyshfyshfyshfyshfyshfyshf ysh
fyshfyshfyshfyshfyshfyshfyshfyshfyshfyshfyshf yshfyshfyshfyshfysh
fyshfyshfyshfyshfyshfyshfyshfyshfyshfyshfyshf yshfyshfyshfyshfyshfyshfysh

Edit: Also, only updated strings are sent to clients, not the entire table.
fysh is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 04-04-2005 , 05:09  
Reply With Quote #20

Quote:
Originally Posted by vancelorgin
I'm 90% sure the panel, once shown, won't update should the string change, so just queue the requests up and delay if we can't figure out how to invalidate the mother fucker.

vancelorgin

vancelorgin

vancelorgin
The panel does change, it's just completely out of sync with when you want it to change, I suspect a delay is required. I tried doing,

network string update, show panel,
network string change, show panel

by doubling up the code but with no success.

Mani
Mani Mani
Mani Mani Mani
Mani Mani Mani Mani
Mani Mani Mani Mani Mani
Mani Mani Mani Mani
Mani Mani Mani
Mani Mani
Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani 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 08:16.


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