Valhalla Legends Forums Archive | Visual Basic Programming | Multiple Responses

AuthorMessageTime
CrAz3D
[code]Public Function PlugEvent(ByVal TheEvent As String, Optional Username As String, Optional Message As String) As String
On Error Resume Next 'GoTo PlugER
For i = 0 To UBound(PlugY) - 1
Chat True, True, vbRed, PlugL(i)
PlugEvent = PlugY(i).Run(TheEvent, Username, Message)
DoEvents
Next i
'Exit Function
'PlugER: MsgBox Err.Description
End Function[/code]

I call the above sub:
PlugEvent "Command", "CrAz3D", "\listresps"

If I have more than 1 object in the PlugY array, more than 1 that should return something, it replaces the previous response from a different plugin.

How could I make a single event (IE: Command1_Click()) return the response from multiple plugins?

[code]Command1_Click()
Msgbox PlugEvent("Command", "CrAz3D", "\listresps")
[/code]

Any help is appreciated.
May 29, 2004, 7:32 PM
Noodlez
Why don't you make PlugEvent an array?
June 1, 2004, 1:57 PM
Adron
It depends on how you want to treat the responses. Do you want them all concatenated? Do you want one messagebox per response?
June 1, 2004, 2:38 PM
CrAz3D
I just ended up using an array, differently than having PlugEvent being an array.

How WOULD I make PlugEvent an array?
June 1, 2004, 5:02 PM

Search