From: Malte Thiesen <malte.thiesen@kamalook.de>
Hi,
I use the following code to create nested tables. The function takes a
Lua-state and a string like "very.deeply.nested" and then creates all
the subtables down to "nested" and leaves the "deepest" table on the
stack.
It also makes sure that the tables aren't overwritten, so if you
create
"very.deeply.nested" and "very.deeply" already exists only "nested" is
created. Unlike you I use std::string not C-strings so you may have to
adapt the code a little.
bool CreateNestedTable(lua_State * L, const std::string & TableName)
{