Calling a handler with variables in a handler

I’m in a situation where I need to call a handler with variables within another handler. I’ve experimented and can’t seem to find the right method of doing it. :smiley:

Any help is much appreciated! Thanks!

To call a specific handler within another script you can generally use ScriptName.HandlerName (to be totally safe when calling as a function, put ScriptName in quotes). To pass parameters, just include them in the usual way. So, to call a handler as a command, passing parameters p1, p2, and p3:

ScriptName.HandlerName p1,p2,p3

To call it as a function:

put "ScriptName".HandlerName(p1,p2,p3)

That’s about all there is to it. You can use [size=18]'s[/size] instead of [size=18].[/size] if you prefer:

ScriptName's HandlerName p1,p2,p3

Well, okay, there’s more to it, but only if you want to do something fancy like store the name of the script or the handler in a variable in order to dynamically choose the command or function that’s being called (let me know if that’s what you were asking). The examples above should be what you need 99% of the time.