sol2
sol2 copied to clipboard
Undesired default construction for arguments.
I have this snippet:
sol::usertype<my_type> my_usertype= Lua.new_usertype<my_type>("my_type");
my_usertype[sol::meta_method::to_string] = [](const int &SomeInt, const int &, const int &, const int &, const int &, const int &, const int &, const int & Hmm) {
return "";
};
And even tho i do not pass any arguments when calling this in Lua, all its arguments become 0.
Can i somehow prevent this behavior? I am not sure what causes it.
I also tried strings which seems to initialize them as an empty string ("").