View Single Post
03-04-13, 07:08 PM   #1
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
Passing additional arguments when hooking scripts

Good evening,

I am curious if there is a method for passing additional arguments to the function of a script hook, other than those that are specific to that script.

The scripts in particular are OnMessageScrollChanged and OnShow. I'd like to pass a variable to the function, but I don't see any way of defining that variable.

Code:
frame:HookScript("OnMessageScrollChanged", bottomButtonControl(Here))
frame:HookScript("OnShow", bottomButtonControl(Here))
Thank you for the help!

Edit: I have thought of a solution for my problem: defining the variable outside of the function, and just setting it, rather than defining and setting it inside of the function. This will eliminate the need to pass the variable as an argument to the HookScript's function, but I am still curious if it is possible.

Last edited by Clamsoda : 03-04-13 at 07:49 PM.
  Reply With Quote