Jump to content
  • Advertisement
Sign in to follow this  

Chat program - user list (help!)

This topic is 4998 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm working on a chat program in VB6. I want to have a dynamically updating user list that updates whenever a client enters/leaves the room. If a client joins/leaves the room, then the current list of who's in there, up to date, should be transmitted to them. Any thoughts on how that would be achieved? Also, I'm having trouble with some code on my server app (client and server are separate apps). When a user joins the room, their name is added to an array called handles(). I want to add their name to a dropdown list (combobox) called lstUsers, but only if it isn't there already. lstUsers is not part of a control array, and here's the broken code:
For X = 0 To UBound(handles)

    If frmMain.lstUsers.Text(X) <> username And frmAdminMessage.lstUsers.Text(X) <> username Then
    frmMain.lstUsers.AddItem username  'variable username is extracted from a received string using the Split function
    frmAdminMessage.lstUsers.AddItem username 'same here
    End If

Next X

I get an error saying "Wrong number of arguments or invalid property assignment" when a client tries to connect, and the debugger highlights the ".Text" part of my first add line. Please help me, this is really starting to irritate me because it should be a simple bug to fix.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!