i created more or less complex table in c. want create reference on lower level of tree. possible? idea: elem000 +--> elem010 +--> elem020 +--> elem120 | +--> **elem121** | +--> elem122 +--> elem030 +--> elem130 | +--> elem131 | +--> elem132 +--> **elem121** the elem121 should visible 1 level above, i.e. reference i added example of wanted to.. void pushl(lua_state *l, const char * str) { char s[255]; strcpy(s, "elem"); strcat(s, str); lua_pushstring(l, s); // key strcpy(s, "value"); strcat(s, str); lua_pushstring(l, s); // value lua_settable(l, -3); } void maketable( lua_state *l ) { lua_pushstring(l, "tbl0"); // name of sub-table lua_createtable(l, 0, 0); lua_checkstack(l, 3); { pushl(l, "000"); lua_pushstring(l, "tbl1"); lua_createtable(l, 0, 0); lua_checkstack(l, 3); { pushl(l, ...
Comments
Post a Comment