Nested containers are not supported

Hi.

My code is

static void InsertRowsIntoTable(const FString DatabaseName, const FString TableName, TArray<TArray<FSQLiteTableField>> rowsOfFields);

And it gets error:

1>------ Build started: Project: SQLite, Configuration: Development_Editor x64 ------
1>  Parsing headers for SQLiteEditor
1>  C:/Art/Projects/3D/MyGame/Plugins/SQLite3UE4/Plugins/SQLite3UE4Plugin/Source/SQLite3UE4Plugin/Classes/SQLiteDatabase.h(258) : Nested containers are not supported.
1>  Reflection code generated for SQLiteEditor
1>  Performing 8 actions (2 in parallel)
1>  MyActor.cpp
1>  PCH.SQLite3UE4PluginPrivatePCH.h.cpp
1>C:\Art\Projects\3D\MyGame\Plugins\SQLite3UE4\Plugins\SQLite3UE4Plugin\Source\SQLite3UE4Plugin\Classes\SQLiteDatabase.h(198): error C2660: 'USQLiteDatabase::InsertRowsIntoTable' : function does not take 2 arguments
1>C:\Art\Projects\3D\MyGame\Plugins\SQLite3UE4\Plugins\SQLite3UE4Plugin\Source\SQLite3UE4Plugin\Classes\SQLiteDatabase.h(198): error C2660: 'USQLiteDatabase::InsertRowsIntoTable' : function does not take 2 arguments
1>  -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: C:\Art\Projects\3D\MyGame\Plugins\SQLite3UE4\Plugins\SQLite3UE4Plugin\Binaries\Win64\UE4Editor-SQLite3UE4Plugin.pdb
1>  Total build time: 50,65 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.8\Engine\Build\BatchFiles\Build.bat" SQLiteEditor Win64 Development "C:\Art\Projects\3D\MyGame\Plugins\SQLite3UE4\SQLite.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

How can I realize nested arrays?

Thank you.

Solution found there Two dimensional array - Programming & Scripting - Epic Developer Community Forums in answer from @Erasio .

I know this is an older post, but for those coming here from a web search – It is possible to extend container classes and nest them within other containers. For example:

#include "Project.h"

class PROJECT_API TPKeyStringMap : public TMap<FKey, FString>
{
  // This class is a map of FKey to FString.
};

// ...

TMap<SomeOtherType, TPKeyStringMap> MyNestedMap;

Happy nesting!

1 Like

So, for when the link breaks: 2d array is unsupported. Workaround: use an array of structs, each containing an array.

Hello, does this still hold for UE5?

I’m watching the following video and around 6mins, we get reminded that “Nested Containers are not supported”.

https://dev.epicgames.com/community/learning/courses/mDa/programming-kickstart/JwJ/programming-schematic

Yes, this is still the case for UE5.

1 Like
TArray<TArray<ATile*>> Tiles2DArray;

it works only for cpp,u can`t trying use “UPROPERTY” expose it to Blueprint

3 Likes