Static Vars and Callback Functions (DRIVING ME NUTS!)

I’ve been working on this for the past two days after work and I can’t figure out what lua does for static variables.

My basic code structure is like this:

// get and parse rotation data through udp packets <this works

local function StationaryAimingCreateMove (cmd)
// do stuff with view angles

hook.Add (“CreateMove”, “SACM”, StationaryAimingCreateMove)

I want to be able to access the parsed data in the callback function from the StationaryAimingCreateMove function.
in C programming (blessed be thy name), you’d use a global static var and be done in 30 seconds. I can’t for the life of me figure out how to get it working in lua.

You’d get better results if you posted in the Questions area.

I’ll try that, thanks.