Valhalla Legends Forums Archive | Battle.net Bot Development | simple question

AuthorMessageTime
cRaPPy
I'm using cbs and wanted to add a whisper command button I added the following code:

[code]Private Sub lvChannel_Click()
Dim strList As String
List = lvChannel.SelectedItem.Text
End Sub
Private Sub cmdWhisper_Click()
CleanSlateBot1.Send "/w " & strList & " " & txtsend.Text
txtsend.Text = ""
End Sub[/code]

[7:03:36 PM] That user is not logged on.

I'm guessing the username in the channel list is not being read, can someone help me fix my code so it does?

thx ;D
July 12, 2004, 10:11 PM
Eli_1
strList is a private variable - you cannot use it in another function.

Edit:
On a side note, you're never actually setting strList to anything.

Edit:
On another side note, I don't even see why a variable is needed.

Edit:
On another side note, I don't see how that compiles. :-[
July 12, 2004, 10:17 PM
cRaPPy
Thx for your help works now
[code]Private Sub cmdWhisper_Click()
CleanSlateBot1.Send "/w " & lvChannel.SelectedItem.Text & " " & txtsend.Text
txtsend.Text = ""
End Sub[/code]
.... my first bot so I'm finding it exciting and been at in non stop and dont even know when the last time i slept was so I end up doing a lot of stupid stuff :-\ but anyways yeah.. thx again ;D
July 12, 2004, 10:26 PM
hismajesty
it's also allocating more values to memory than it needs to. :)
July 13, 2004, 1:23 AM

Search