Valhalla Legends Forums Archive | Battle.net Bot Development | Wildcards...I cant find error

AuthorMessageTime
Gangz
Can you guys see any errors in this on why it wouldnt work?

[code] If strAccess = "M" Or strAccess = "O" Then
If LCase(Mid(message, 1, 5)) = Form1.varTrigger & "ban " Then
message = Replace(message, Form1.varTrigger & "ban ", "")
For i = 0 To Form1.ul.ListCount
If LCase(message) Like LCase(Form1.ul.List(i)) Then
Form1.cboQueue.AddItem "/ban " & Form1.ul.List(i)
End If
Next i
End If

[/code]
December 29, 2003, 1:27 AM
UserLoser.
[code]LCase(message) Like LCase(Form1.ul.List(i))[/code]

Switch that around, it's String Like Pattern, not Pattern Like String

What you have, would do [code]If *bob* Like JoeBobbity[/code] - which would return false
December 29, 2003, 2:12 AM
Gangz
thanks user...For thos eof you that are as newbie as me it works like this. [code] If LCase(Form1.ul.List(i)) Like "*" & LCase(message) & "*" Then[/code]
December 29, 2003, 2:17 AM
Yoni
[quote author=Gangz link=board=17;threadid=4479;start=0#msg37396 date=1072664228]
thanks user...For thos eof you that are as newbie as me it works like this. [code] If LCase(Form1.ul.List(i)) Like "*" & LCase(message) & "*" Then[/code]
[/quote]Not sure what you want it to do but that looks like a bad idea. "message" might contain wildcard characters and then you might get unwanted effects. You should probably just use InStr.
December 29, 2003, 2:25 PM

Search