Open Nava2 opened 8 years ago
Interestingly, this works fine:
_lua.set_function("test_table", [](sol::table table) {
std::string a = table["a"];
std::cout << "table.a = " << a << std::endl;
});
_lua.script("test_table { a = \"wat\" }");
There was a bug in the logic for detecting whether or not a table was called with .new
versus :new
. This is fixed in sol2
.
Currently,
sol
fails to pass asol::table
as a parameter to ausertype
.Minimum example:
The error message is:
lua: error: No matching constructor for the arguments provided