Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to read LuaValue #26

Open
xx1adfasd opened this issue Jul 29, 2024 · 0 comments
Open

Question: How to read LuaValue #26

xx1adfasd opened this issue Jul 29, 2024 · 0 comments

Comments

@xx1adfasd
Copy link

I didn't see from the example. When we call scripting_runtime.call_fn, we got a Result<LuaValue, ScriptingError>, and the example only unwraps it.
What if I want to return a bool value from the lua function, and I want to check it's true or false? How to do it?
I can't find information for reading the LuaValue type. It seems to wrap the RegistryKey from lua, but then we neet to get the engine inside LuaRuntime

pub struct LuaRuntime {
    engine: LuaEngine,
}

but it's private. And there's no method to do it as far as I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant