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

kaguya call lua #99

Open
liwei1024 opened this issue May 18, 2021 · 1 comment
Open

kaguya call lua #99

liwei1024 opened this issue May 18, 2021 · 1 comment

Comments

@liwei1024
Copy link

For example, I have a piece of code in Lua that calls " game_data.task:test() "

How is the Kaguya called

I tried the “state [" game_data "] [" task "] [" test "] ()” and the “state [" game_data. Task: test "] ()”

@satoren
Copy link
Owner

satoren commented May 18, 2021

Can you try below.

auto result = state["game_data"]["task"]["test"](state["game_data"]["task"])

or

auto result = state.loadstring("return game_data.task:test()")()

If you do not need return data

state("game_data.task:test()")

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

2 participants