Multiple Sending Problems
Here is my code:
Code:
Case "MODE" 'if someone sets the mode on someone
Dim p As Integer
For p = 0 To lstUsers.ListCount - 1
If lstUsers.Selected(p) = True Then
displaychat "** " + from$ + " sets mode " + processParam(processRest(params$)) + " on " + Me.lstUsers.Text + " **" 'display the mode change
Else
If lstUsers.Selected(p) = False Then
displaychat "** " + from$ + " sets mode " + processParam(processRest(params$)) + " on " + processParam(params$) + " **" 'display the mode change
End If
End If
Next
What I'm trying to say is if a user is selected in the lstUsers, then send isplaychat "** " + from$ + " sets mode " + processParam(processRest(params$)) + " on " + Me.lstUsers.Text + " **"
If a user is not selected in lstUsers, then send displaychat "** " + from$ + " sets mode " + processParam(processRest(params$)) + " on " + processParam(params$) + " **"
But it sends the message twice still. I don't know what code to use.
Re: Multiple Sending Problems
Try this:
Code:
Case "MODE" 'Someone set mode on someone else
Dim p As Integer
'If there is at least one selected user, then...
If lstUsers.SelCount > 0 Then
'Loop through all users in list
For p = 0 To lstUsers.ListCount - 1
If lstUsers.Selected(p) Then
displaychat "** " + From$ + " sets mode " + processParam(processRest(params$)) + " on " + Me.lstUsers.Text + " **" 'display the mode change
End If
Next p
Else
'No selected users
displaychat "** " + From$ + " sets mode " + processParam(processRest(params$)) + " on " + processParam(params$) + " **" 'display the mode change
End If
Also, you should get in the habbit of indenting and spacing out your code. See how much easier that is to read? :D
Re: Multiple Sending Problems
Alright I will. And thanks a lot DigiRev, it worked.
Re: Multiple Sending Problems