Valhalla Legends Forums Archive | Battle.net Bot Development | Why doesnt this work?

AuthorMessageTime
TeEhEiMaN
I think im pretty close to gettin this but, can you tell me what to change, Fix.

[code]
Private Sub channels()
If Username = Form5.txtMaster.Text Then
If Left((LCase(Message)), 12) = (Form5.txtTrigger.Text & "addchannel ") Then
Dim chanuser As String
cmbchannellist.combo.AddItem = "chanuser"
End If
End If
End Sub
[/code]

May 26, 2003, 10:48 PM
______
You didnt set chanuser

[code]
chanuser = Right(Message, (Len(Message) - 12))
[/code]
put that right above your
[code]
cmbchannellist.combo.AddItem = "chanuser"
[/code]
May 26, 2003, 11:12 PM
tA-Kane
[code]chanuser=Mid(Message,13)
cmbchannellist.combo.AddItem = chanuser[/code]
May 26, 2003, 11:12 PM
tA-Kane
[quote author=______ link=board=17;threadid=1450;start=0#msg10811 date=1053990734]You didnt set chanuser[code]chanuser = Right(Message, (Len(Message) - 12))[/code]put that right above your[code]cmbchannellist.combo.AddItem = "chanuser"[/code][/quote]That code will still add "chanuser" instead of what's stored in chanuser.
May 26, 2003, 11:13 PM
TeEhEiMaN
I dont think that cmbchannellist.combo is right, Its suppost to be like txtchannellist.text for a text Box, but what would it be for a combo box??? please respond fast
May 26, 2003, 11:43 PM
tA-Kane
[quote author=TeEhEiMaN link=board=17;threadid=1450;start=0#msg10823 date=1053992580]what would it be for a combo box???[/quote]Try searching on google or Microsoft...
May 26, 2003, 11:45 PM
Stealth
http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=%22combo+box%22+%22visual+basic%22+adding+items

Google: The answer to the world's problems.

EDIT: Added url tags to link correctly.
May 26, 2003, 11:52 PM
OcTaViuS
[quote author=TeEhEiMaN link=board=17;threadid=1450;start=0#msg10823 date=1053992580]
I dont think that cmbchannellist.combo is right, Its suppost to be like txtchannellist.text for a text Box, but what would it be for a combo box??? please respond fast
[/quote]

ever think to try cmbchannellist.text?
May 26, 2003, 11:58 PM
TeEhEiMaN
Nope that dont work...
May 27, 2003, 12:23 AM
TeEhEiMaN
omg this is weird!!!!!!

Why does this code not work?!

[code]
Private Sub channels()
If Username = Form5.txtMaster.Text Then
If Left((LCase(Message)), 12) = (Form5.txtTrigger.Text & "addchannel ") Then
Dim chanuser As String
chanuser = Right(Message, (Len(Message) - 12))
Combo1.AddItem = "chanuser"
End If
End If
End Sub
[/code]
May 27, 2003, 12:59 AM
tA-Kane
In what way does it not work? In what way do you wish it to work? Stop being a <expletives removed>, and try to help us help you!
May 27, 2003, 6:47 AM
Soul Taker
This won't fix whatever the problem is, but I'd use
[code]
chanuser = Mid(Message, 13)
[/code]
instead of
[code]
chanuser = Right(Message, (Len(Message) - 12))
[/code]
... Just because it's easier to figure out at a glance (I think).
May 27, 2003, 6:57 AM
OcTaViuS
[quote author=TeEhEiMaN link=board=17;threadid=1450;start=0#msg10832 date=1053997196]

[code]
Combo1.AddItem = "chanuser"
[/code]
[/quote]

dont use quotes around chanuser
May 27, 2003, 3:39 PM
______
[quote author=OcTaViuS link=board=17;threadid=1450;start=0#msg10878 date=1054049958]
[quote author=TeEhEiMaN link=board=17;threadid=1450;start=0#msg10832 date=1053997196]

[code]
Combo1.AddItem = "chanuser"
[/code]
[/quote]

dont use quotes around chanuser
[/quote]

yes otherwise your just adding "chanuser" as text not a string
May 27, 2003, 4:12 PM

Search