Hey Y’all, I’ve been following this tutorial: https://youtu.be/uZPzTN5Debc
But at around 6:52, I get this error:
name followed by ‘::’ must be a class or namespace name
It’s referring to this piece of code here:
Here is my .cpp file:
// Fill out your copyright notice in the Description page of Project Settings.
#include "SaveFileSystem.h"
#include "Misc/FileHelper.h"
#include "HAL/PlatformFilemanager.h"
bool USaveFileSystem::SaveArray(FString SaveDirectory, FString FileName, TArray<FString> SaveText, bool bAllowOverriding = false)
{
// Set The File Path
SaveDirectory += "\\";
SaveDirectory += FileName;
if(!bAllowOverriding)
{
if(PlatformFileManager::Get().GetPlatformFile().FileExists(*SaveDirectory))
{
return false;
}
}
}
And here is my .h file:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "SaveFileSystem.generated.h"
/**
*
*/
UCLASS()
class RHYTHM_RUMBLE_API USaveFileSystem : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
UFUNCTION(BlueprintCallable, Category="FileSystem", meta = (Keywords = "Save"))
static bool SaveArray(FString SaveDirectory, FString FileName, TArray<FString> SaveText, bool bAllowOverriding);
};
This project started out as a blueprint project, if that means anything.