It takes a table of arguments, and processes those with the following functions and arguments..function process(Table,...)
Spring.Echo("Processing")
--local arg = table.pack(...)
T={}
if Table then T=Table else Spring.Echo("Lua:Toolkit:Process: No Table handed over") return end
if not arg then bDbgEcho("No args in process") return end
if type(arg)== "function" then return elementWise(T,arg) end
TempArg={}
TempFunc={}
--if not arg then return Table end
for _, f in pairs(arg) do
if type(f)=="function" then
T=elementWise(T,f,TempArg)
TempArg={}
else
TempArg[#TempArg+1]=f
end
end
return T
end
Now here is where the trouble starts- this function is running fine within the context of a unitscript call (HitByWeapon)
But not soo much in a thread on its own.
Actually there, it just doesn't receive the arguments and opts out early.
Anybody had a similar experience?
If it works its sweet peace, as in, it allows for processing of units with anonymous functions in lua.
Any help appreciated