I created a file with the following code
Request = {
TimeAdd = true;
DaysAdd = true;
};
The source code is made in C
lua_getglobal(L, "Request")
lua_getfield(L, -1, "TimeAdd");
time_request = lua_toboolean(L, -1);
lua_getfield(L, -1, "DaysAdd");
data_request = lua_toboolean(L, -1);
I do the compilation of the program normally more it occurs error lua
LUA PANIC: unprotected error in call to Lua API (attempt to index boolean value)