deleting a username from a server list
I recently made a server and chat client, and everything works fine except that if someone tries to disconnect, the name doesn't disappear for some reason..
I have a list of users all set up on my server, but if someone disconnects or closes their client, the name on the server list doesn't disappear. I've tried...
+ User: On User Left
(under the list)
- Delete line FindStringExact("List", PCU_GetName$("Mooclick"),1)
and
On the client:
+ Close windows has been selected
(under Mooclick)
- Player: Send P_GetName$("Mooclick") on subchannel 13 to Server
(under Storyboard Controls)
- End the application
On the server:
+ Connection: On Client Message
+ SC_OnClientMsg_GetSubchannel("Mooclick") = 13
(under the list)
- Delete line FindStringExact("List", SC_OnClientMsg_GetText$("Mooclick"),0)
Anybody know what's wrong?
Re: deleting a username from a server list
1. There is no guarantee the message on sub-channel 13 will be sent.
2. Perhaps do a check for disconnection event on the server and remove the person with that name, and mix that with semi-regular pinging to detect disconnection.
Re: deleting a username from a server list
Hang on, are subchanel messages sent on UDP? how can you send a TCP message?
Re: deleting a username from a server list
+ User: On User Left
(under the list)
- Delete line FindStringExact("List", PCU_GetName$("Mooclick"),1)
Isn't that checking to see if they disconnected?
Re: deleting a username from a server list
here are the files to download
client: http://www.mediafire.com/?epefztv4tex
server: http://www.mediafire.com/?ddhhgtyxl0e
Re: deleting a username from a server list
On user left: Delete line FindStringExact("List", PCU_GetName$("Mooclick"),0)
... or does it not matter?
EDIT, You code is wrong!!
Connection: On Disconnect
+ FindStringExact( "Userlist", SC_GetName$( "MooClick" ), 0)
Find Condition under: Server->Connection->On Disconnect.
Re: deleting a username from a server list