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

Calling function with string as argument from Lua #112

Open
ChrSacher opened this issue Oct 20, 2015 · 1 comment
Open

Calling function with string as argument from Lua #112

ChrSacher opened this issue Oct 20, 2015 · 1 comment

Comments

@ChrSacher
Copy link

I am trying to call a C++ function from Lua with std::string as Argument. It fails because it expected a string but got a table. Is there a way to convert them?
Lua
Input:isKeyDown("w")

C++
bool isKeyDownS(std::string string)

@madeso
Copy link

madeso commented Jan 1, 2016

Functions bound with State:SetObj doesn't seem to require self, so a standard dot call should suffice, however I'm facing problems with SetObj and std::string ( #141 ).
In the mean time, standard free functions seems to work fine with std::string.

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