Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: zeth369 on January 15, 2005, 12:35 AM

Title: Say Command
Post by: zeth369 on January 15, 2005, 12:35 AM
=-/ I cant get the say command working.. I tried ..


If Message = Trigger & "say" Then
If Username = Master Then CSB.Send Mid(Message, 6)


in the user_talk sub.. its not workin tho.. any suggestions?
Title: Re: Say Command
Post by: Kp on January 15, 2005, 12:49 AM
Have you considered debugging?  What are the values of Trigger, Username, Message, Master when someone speaks?  Don't just post what you think they are, check their actual values and post those.
Title: Re: Say Command
Post by: Warrior on January 15, 2005, 10:21 AM
Does the Username = Master  :P
Title: Re: Say Command
Post by: CrAz3D on January 15, 2005, 10:34 AM
The problem is that you're check to see if the WHOLE message is Trigger & "say"....you should only be checking the length of the trigger & say.

if Left(Message,Len(Trigger)+3) = Trigger & "say" then

Try something like that
Title: Re: Say Command
Post by: zeth369 on January 15, 2005, 11:03 AM
that didnt work..
RTE - 380 'Invalid Property Value'

Highlights this..

.SelColor = saElements(i)

in my addchat mod
Title: Re: Say Command
Post by: Warrior on January 15, 2005, 11:06 AM
then its a problem in your AddChat Module? Lol. Cmon lets use our heads here.
Title: Re: Say Command
Post by: CrAz3D on January 15, 2005, 11:10 AM
Show us the place where you're trying to AddChat that makes it give you the error.
Title: Re: Say Command
Post by: zeth369 on January 15, 2005, 11:13 AM
AddChat , 696969, "<", vbCyan, frmConfig.txtUsername.Text, 696969, "> ", vbWhite, Mid(Message, 6)

is the addchat

[edit]shit.. i think i found the problem


[edit] yea.. i put a comma after AddChat.. im so stupid, but thanks the say does work.. lol
Title: Re: Say Command
Post by: Warrior on January 15, 2005, 11:25 AM
This is a little trivial and should be moved to the Visual Basic forum since it doesnt directly deal with Battle.net it deals more with string manipulation.

Also @ your error : Lol.
Title: Re: Say Command
Post by: CrAz3D on January 15, 2005, 11:26 AM
I've made ALOT of stupid errors that have thrown me off for like an hour, its all good.
Title: Re: Say Command
Post by: Warrior on January 15, 2005, 11:31 AM
So aside from that error did it work?
Title: Re: Say Command
Post by: zeth369 on January 15, 2005, 11:32 AM
yes =-/