Hello,
I am a little stuck on something right now. As a disclaimer, I am quite new to c++ so it may just be very obvious. Here’s the code:
static bool FORCEINLINE createFindFolder()
{
FString folderLocation = “C:/ProgramData/StoreManager”;
IPlatformFile& file = FPlatformFileManager().Get().GetPlatformFile;
if (!file.DirectoryExists(*folderLocation))
{
file.CreateDirectory(*folderLocation);
if (!file.DirectoryExists(*folderLocation))
{
return false;
} else
{
return true;
}
}
}
static bool FORCEINLINE createWriteFile(FString textArray[])
{
FString directory = "C:/ProgramData/StoreManager";
FString arrayText = textArray->GetCharArray;
// DateCalc //
FString fileName = FString().Append("SM_ConsoleDump");
bool overwrite = true;
IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
if (PlatformFile.CreateDirectoryTree(*directory))
{
FString absolutepath = directory + "/" + fileName;
if (overwrite || !PlatformFile.FileExists(*absolutepath))
{
FString linefinder = textArray->FindLastChar;
int32 lines = textArray->Find(linefinder);
FFileHelper::SaveStringArrayToFile(&textArray->GetCharArray & lines, *fileName);
}
}
}
// Console //
UFUNCTION(BlueprintCallable, Category="BP")
static bool dumpConsole(FString ArrayText[])
{
createFindFolder();
if (createFindFolder)
{
createWriteFile(ArrayText);
if (createWriteFile(ArrayText))
{
return true;
}
}
else
{
return false;
}
}
Currently I am getting this error for quite a few lines:
If someone could help than thanks!