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 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.