8000 "Invalid arguments to method call" error when calling a function that returns an object · Issue #534 · NLua/NLua · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

"Invalid arguments to method call" error when calling a function that returns an object #534

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

Open
MEMESCOEP opened this issue Aug 23, 2024 · 0 comments

Comments

@MEMESCOEP
Copy link

I'm getting a Invalid arguments to method call error when I try to call the following method from Lua:

public RigidBody GetRigidbodyOnSelf()
{
    return ParentObject.ObjectRigidbody;
}

I've registered the method by doing LuaCodeRunner.RegisterFunction("GetSelfRB", typeof(ScriptRunner).GetMethod("GetRigidbodyOnSelf"));, and I call the function like so:

function Start()
    RB = GetSelfRB()
end

function Update(DeltaTime)

end

@MEMESCOEP MEMESCOEP changed the title "Invalid arguments to method call" error when calling a function that returns a value "Invalid arguments to method call" error when calling a function that returns an object Aug 23, 2024
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
0