First of all, I'm stuck with Lua 5.0, because I'm developing for the WoW API (a client built from 2006). Why torture myself? Because I get a kick out of seeing what's possible.
So here is my question: I have a table, that contains a bunch of functions, for example, this one:
function Questie:UNIT_AURA(unitId)
--log("UnitID: "..unitId)
end
I have another function, which is supposed to automatically route to that function (and it does, to an extent).
function Questie:OnEvent()
Questie[event](arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10)
end
In this case, event is a global variable, which is equal to the name of the function, for example UNIT_AURA. arg1 to arg10 are also global and should be passed to whatever function event leads to.
The function is called just fine, but all the parameters are nil (even if they exist in Questie:OnEvent.
So my question is, how do I make them get passed properly? Evidently, I'm doing something wrong.