I have a C++ function that I want to return a lua table
luabind::object getPosition(void)
{
luabind::table=luabind::newtable(this->state);
table["x"]=this->position[0];
table["y"]=this->position[1];
return table
}
The problem is that when lua calls this function, a number is returned instead of a table.