NLua problem
I'm trying to embed lua in my application and I'm stuck over a problem that it cannot pick method names from .NET
LUA:
C#:
The error
LUA:
import ('System.Diagnostics')
Process:Start("notepad")import ('System.Diagnostics')
Process:Start("notepad")C#:
static void Main()
{
Lua state = new Lua();
state.LoadCLRPackage();
string script = File.ReadAllText("script.lua");
state.DoString(script);
}static void Main()
{
Lua state = new Lua();
state.LoadCLRPackage();
string script = File.ReadAllText("script.lua");
state.DoString(script);
}The error
Unhandled Exception: NLua.Exceptions.LuaScriptException: [string "chunk"]:3: attempt to index a nil value (global 'Process')
at NLua.Lua.ThrowExceptionFromError(Int32 oldTop)
at NLua.Lua.DoString(String chunk, String chunkName)
at LuaEmbed.Program.Main() in D:\Dev\Sharp\LuaEmbed\LuaEmbed\Program.cs:line 15Unhandled Exception: NLua.Exceptions.LuaScriptException: [string "chunk"]:3: attempt to index a nil value (global 'Process')
at NLua.Lua.ThrowExceptionFromError(Int32 oldTop)
at NLua.Lua.DoString(String chunk, String chunkName)
at LuaEmbed.Program.Main() in D:\Dev\Sharp\LuaEmbed\LuaEmbed\Program.cs:line 15