Dispatch Function with a Variable of Parameters
Posted: Mon Jan 16, 2012 1:26 pm
Hi I've managed to perfect using the Params function to retrieve a list of additional parameters passed to my function. However now I'm stuck with the possibility of forwarding these onto a registered module for my event system. If my DispatchEvent() function is passed an event name called PlayerLogon and then is given a username and a session ID these count as 2 additional parameters which can be retrieve using the params function.
The way I've programmed my function is so that it places each additional parameter along with the event name into a variable called tArguments which looks like "PlayerLogon, Administrator, 0". I tried making use of just Dispatch Function "EventDispatched" To Stack "MyStack" With tArguments however upon examining the debugger I find that rather than passing each argument as per what I would have thought given the comma inbetween, it instead clumped them all together as one argument.
So my question is, is there anyway to make use of dispatch and pass each item of the tArguments variable without it clumping together? If not I'll quite happily resort to using something like an array.
Thanks, Mike.
The way I've programmed my function is so that it places each additional parameter along with the event name into a variable called tArguments which looks like "PlayerLogon, Administrator, 0". I tried making use of just Dispatch Function "EventDispatched" To Stack "MyStack" With tArguments however upon examining the debugger I find that rather than passing each argument as per what I would have thought given the comma inbetween, it instead clumped them all together as one argument.
So my question is, is there anyway to make use of dispatch and pass each item of the tArguments variable without it clumping together? If not I'll quite happily resort to using something like an array.
Thanks, Mike.