Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: titan0060 on August 22, 2004, 11:14 AM

Title: Channel Name Display?
Post by: titan0060 on August 22, 2004, 11:14 AM
Ok, i've been messing around with a Clean Slate Bot, can someone help me with this?

I want it to say the channel it's in above the channel list.  I cant get the label to work.
Title: Re:Channel Name Display?
Post by: CrAz3D on August 22, 2004, 11:23 AM
Sub CleanSlateBot1_OnChannel(ChannelName as string)
Label1.Caption = ChannelName
end sub


That should be close to working...
Title: Re:Channel Name Display?
Post by: Stealth on August 22, 2004, 12:06 PM
If you have trouble with Labels, you should probably drop your bot project temporarily and come back to it after you've learned somewhat more of the way Visual Basic works.
Title: Re:Channel Name Display?
Post by: Antichrist on August 22, 2004, 01:17 PM
I dont think he's having a problem with the Label Stealth. It's more of the code in getting the channel name to appear on the label.
Title: Re:Channel Name Display?
Post by: MyndFyre on August 22, 2004, 01:42 PM
Quote from: Antichrist on August 22, 2004, 01:17 PM
I dont think he's having a problem with the Label Stealth. It's more of the code in getting the channel name to appear on the label.

/me applauds Antichrist for really getting to the crux of the issue.
Title: Re:Channel Name Display?
Post by: Newby on August 22, 2004, 03:57 PM
Find the correct event name :|
Title: Re:Channel Name Display?
Post by: titan0060 on August 22, 2004, 04:00 PM
Quote from: CrAz3D on August 22, 2004, 11:23 AM
Sub CleanSlateBot1_OnChannel(ChannelName as string)
Label1.Caption = ChannelName
end sub


That should be close to working...

That does absolutly nothing
Title: Re:Channel Name Display?
Post by: TangoFour on August 22, 2004, 04:13 PM
This code *assumes* the label that is meant to display your channel name is called Label1

Surely you understood that?
Title: Re:Channel Name Display?
Post by: titan0060 on August 22, 2004, 04:27 PM
jeez, im dumb but im not that dumb.
Title: Re:Channel Name Display?
Post by: titan0060 on August 22, 2004, 04:27 PM
besides, label1 was the name of the label anyways...
Title: Re:Channel Name Display?
Post by: shadypalm88 on August 22, 2004, 04:45 PM
Quote from: TangoFour on August 22, 2004, 04:13 PM
This code *assumes* the label that is meant to display your channel name is called Label1

Surely you understood that?
It also assumes your CleanSlateBot is named CleanSlateBot1.

But honestly, if you have to ask these types of questions, don't make a bot.  Please.
Title: Re:Channel Name Display?
Post by: ChR0NiC on August 22, 2004, 04:46 PM
Quote from: titan0060 on August 22, 2004, 04:00 PM
That does absolutly nothing


Private Sub CleanSlateBot1_JoinedChannel(ByVal ChannelName As String, ByVal Flags As Long, SimulatedEvent As Boolean)

Label1.Caption = ChannelName

End Sub


There, I did the work for you.
Title: Re:Channel Name Display?
Post by: titan0060 on August 22, 2004, 05:24 PM
Thanks, now it works
Title: Re:Channel Name Display?
Post by: ChR0NiC on August 22, 2004, 05:48 PM
Quote from: titan0060 on August 22, 2004, 05:24 PM
Thanks, now it works

Once a problem is solved


ChannelTitle = ChannelTitle & " [SOLVED]"


Meaning change the title, so people know it's been solved so they don't continue to post here.
Title: Re:Channel Name Display?
Post by: R.a.B.B.i.T on August 23, 2004, 12:32 AM
Quote from: ChR0NiC on August 22, 2004, 04:46 PM
Quote from: titan0060 on August 22, 2004, 04:00 PM
That does absolutly nothing


Private Sub CleanSlateBot1_JoinedChannel(ByVal ChannelName As String, ByVal Flags As Long, SimulatedEvent As Boolean)

Label1.Caption = ChannelName

End Sub


There, I did the work for you.
What work?
Title: Re:Channel Name Display?
Post by: ChR0NiC on August 23, 2004, 01:26 PM
Quote from: R.a.B.B.i.T on August 23, 2004, 12:32 AM
What work?

The fact that all he had to do was copy and paste the code into his bot. I gave him the answer, jeez Rabbit don't be so negative.
Title: Re:Channel Name Display?
Post by: MyndFyre on August 23, 2004, 01:42 PM
Quote from: ChR0NiC on August 23, 2004, 01:26 PM
Quote from: R.a.B.B.i.T on August 23, 2004, 12:32 AM
What work?

The fact that all he had to do was copy and paste the code into his bot. I gave him the answer, jeez Rabbit don't be so negative.

I believe RaBBiT was just trying to point out that there really was no work involved.  You drag a label to the form, and you type (more or less) one line of code, which is really just a programmatic assignment of something you could have done through the visual designer (assignment of a caption to a label).
Title: Re:Channel Name Display?
Post by: Gangz on August 24, 2004, 03:25 AM
Quote from: Yegg on August 23, 2004, 02:50 PM
People stop continuing this post. He already figured it out.

He figured it out, or Chronic figured it out?