public void SetMetaTable(int idx) { var val = _stack[idx]; var mtVal = _stack.Pop(); if (mtVal is null) { LuaValue.SetMetaTable(val, null, this); } else if (mtVal.IsTable()) { LuaValue.SetMetaTable(val, mtVal.GetTableValue(), this); } else { Debug.Panic("table expected!"); } }