Nothing is saved

After following Rama’s awesome tutorial:

A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums,Read%26_Write_Any_Data_to_Compressed_Binary_Files

I happen to encounter this problem: Everything goes alright, but when I go to the directory in which files should be saved, I find nothing in there.

Here is the code of the functions:

void UBrickRenderComponent::SaveLoadData(FArchive& Ar,
TArray& SaveVertexBatch )
{
Ar << SaveVertexBatch;
}

bool UBrickRenderComponent::SaveGameDataToFileCompressed(const FString& FullFilePath,
TArray& SaveVertexBatch)

{
FBufferArchive ToBinary;
SaveLoadData(ToBinary, SaveVertexBatch);

// Compress File 
//tmp compressed data array
TArray<uint8> CompressedData;
FArchiveSaveCompressedProxy Compressor =
	FArchiveSaveCompressedProxy(CompressedData, ECompressionFlags::COMPRESS_ZLIB);

//Send entire binary array/archive to compressor
Compressor << ToBinary;

//send archive serialized data to binary array
Compressor.Flush();



//vibes to file, return successful or not
if (FFileHelper::SaveArrayToFile(CompressedData, *FullFilePath))
{
	// Free Binary Arrays 
	Compressor.FlushCache();
	CompressedData.Empty();

	ToBinary.FlushCache();
	ToBinary.Empty();

	// Close Buffer 
	ToBinary.Close();

	return true;
	
}
else
{
	// Free Binary Arrays 
	Compressor.FlushCache();
	CompressedData.Empty();

	ToBinary.FlushCache();
	ToBinary.Empty();

	// Close Buffer 
	ToBinary.Close();

	return false;
	
}

}

And here is the call:

if (!SaveGameDataToFileCompressed(“C:\Users\Migue\Documents\Unreal Projects”, VertexIndexMap))
{
UE_LOG(LogStats, Log, TEXT(“COULD NOT SAVE BUAAAAAAAAAAAAAAAAAAAAH”));
}

Is there anything obvious about this? If you guys know some useful way of invoking UE4 god, Rama, that would be cool

Sorry for your troubles dude, but your title made me lol. Pretty existential stuff.

Indeed, hahaha! :smiley:

Hey guys I just tried to create a text file myself and then complete the path like this:

if (!SaveGameDataToFileCompressed(“C:\Users\Migue\Documents\Unreal Projects\lalala.txt”, VertexIndexMap)) { UE_LOG(LogStats, Log, TEXT(“COULD NOT SAVE BUAAAAAAAAAAAAAAAAAAAAH”)); }

And IT WORKS!!!

I do not know what is in there now, I guess I will have to find out, because it was 1KB initially, and after compiling the program it is 13KB now! :smiley: :smiley: :smiley: :smiley: :smiley: