0

I am trying to handle the parameters returned from lua when I call DoString:

object[] retval = lua.DoString("some_lua_function()");

The luafunction returns nil, true or false as first parameter and a string as second parameter.

What is the best way to receive the parameters as c# bool and string values?

thank you very much!

1 Answers1

1

Try to return the value.

object[] res = lua.DoString ("return some_lua_function()");

Like this https://github.com/NLua/NLua/blob/master/tests/LuaTests.cs#L473

Vinicius Jarina
  • 797
  • 5
  • 16