Valhalla Legends Forums Archive | Battle.net Bot Development | LvChannel Clear?

AuthorMessageTime
WiLD
Ok i have recently changed from CB1 > CB2.

I am having problems with my lvChannel. I want it to clear when you join a new channel but it doesnt work. This is what i got so far:
[code]Private Sub CleanSlateBot2_UserInChannel(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean)
strJSTR = Product
strSexp = Product
strSTAR = Product
strd2 = Product
strD2XP = Product
strW2BN = Product
strw3 = Product
strDiablo = Product
Dim icon As Integer
icon = GetIconCode(Product, Flags)
Dim lagicoN As Integer
lagicoN = GetLagIcon(Ping, Flags)
If icon = ICON_GAVEL Then
With Form1.lvChannel.ListItems.Add(1, Username, Username, , icon)
.ListSubItems.Add lvChannel.FindItem(Username).Index, , , lagicoN
End With
End If
If icon <> ICON_GAVEL Then
With Form1.lvChannel.ListItems.Add(, , Username, , icon)
.ListSubItems.Add , , , lagicoN
End With
End If
End Sub[/code]

That just doesnt seem to work. Says theres somethng wrong with:
[code]With Form1.lvChannel.ListItems.Add(1, Username, Username, , icon)[/code]
i havnt tried it with ops yet but i think i get a different error when its got ops.

PS. A solution plz no mumbo jumbo. Thx
May 25, 2003, 1:24 AM
Yoni
I find no obvious connection between what you said you're trying to do and the code you pasted.
Care to elaborate?

You probably want to do something like:
[code]Private Sub CleanSlateBot2_WhateverTheEventNameIsForChannelJoin(WhateverParameters)
lvChannel.Clear
End Sub[/code]
May 25, 2003, 1:44 AM
UserLoser
lvChannel.Listitems.Clear (Since he's using a listview not a listbox :P)
May 25, 2003, 1:49 AM

Search