• Welcome to Valhalla Legends Archive.
 

Multiple Responses

Started by CrAz3D, May 29, 2004, 02:32 PM

Previous topic - Next topic

CrAz3D

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


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?

Command1_Click()
Msgbox PlugEvent("Command", "CrAz3D", "\listresps")


Any help is appreciated.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Noodlez

Why don't you make PlugEvent an array?

Adron

It depends on how you want to treat the responses. Do you want them all concatenated? Do you want one messagebox per response?

CrAz3D

#3
I just ended up using an array, differently than having PlugEvent being an array.

How WOULD I make PlugEvent an array?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...