How is it possible to call a function when running a lua script using NLua (A LuaInterface fork)?
For example, right now I have:
lua.LoadFile("C:\\test.lua")
lua.Call();
However, that just runs the script. Inside the script I have a custom function. I want to be able to run that function only. I tried:
lua.Call("functionTest")
But that didn't work. How can I do that?
My lua script is like so:
function functionTest()
someMethod()
end
Or, if it's not possible - Is there a way to include different scripts inside one lua file? I want to be able to run the same file with different arguments for scripts, like:
script1 = {
-- Code
}
script2 = {
-- Code
}
Thanks.