Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Tontow on May 03, 2004, 03:31 AM

Title: VB6: help with buggy antiflood
Post by: Tontow on May 03, 2004, 03:31 AM
i just cant seem to get it right, maby someone here could help ( I've been working on this for a few days now...)

frist time its called it works perfictly, but the second time its called it says the item twice, 3ed time it says it 3 times, 4th it says it 4 times, etc...

Private Sub nofloodtime_Timer()
Dim spaces As Integer
Dim trans As String
trans = que(1)
If que(1) <> "" Then frmui.FormHost.queuetextnolblogo trans
spaces = 0

For spaces = 1 To quenum
If que(spaces) <> "" Then que(spaces) = que(spaces + 1)
que(spaces + 1) = ""
Next spaces

spaces = 0

For spaces = 1 To quenum
If que(spaces) = "" Then quenum = quenum - 1
Next spaces
End Sub

Public Sub saythis(rest As String)
quenum = quenum + 1
If que(quenum) = "" Then
   que(quenum) = rest
   End If
End Sub
Title: Re:VB6: help with buggy antiflood
Post by: Grok on May 03, 2004, 06:10 AM
Sounds like you're not popping the queue when you say the top item.
Title: Re:VB6: help with buggy antiflood
Post by: Tontow on May 03, 2004, 01:21 PM
its part of a plugin for a bot, the thing is, there is no anti flood for the plugings so you have to code one in..
frmui.FormHost.queuetextnolblogo trans is the function call to make it "talk" in the chat room.....

ps: i am trying to get this thing to work but no such luck yet.....