I've hit a complete dead end with this. This is probably going to be something incredibly basic and it will most likely result in me smashing my head into a wall for having a major brain fart. My question is basically, how do you loop though tables in lua if the entries are tables themselves?
C++:
lua_newtable(luaState);
for(auto rec : recpay) {
lua_newtable(luaState);
lua_pushnumber(luaState, rec.amount);
lua_setfield(luaState, -2, "Amount");
lua_pushnumber(luaState, rec.units);
lua_setfield(luaState, -2, "Units");
lua_setfield(luaState, -2, rec.type);
}
lua_setglobal(luaState, "RecuringPayments");
Lua:
for _,RecWT in ipairs(RecuringPayments) do
-- RecWT.Amount = nil?
end