Get data from a text file blueprint

I used this thread How can I load text from file with blueprint? - UI - Unreal Engine Forums
and it worked for a long time but it randomly stopped working and I don’t know what’s wrong. My visual studio looks like this

I have no idea what’s wrong or what I should do, my files seem like they’re all named properly and the code seems fine, I’m no C++ expert though. Can someone help me fix this, or tell me how I can load from a text file through blueprint some other way?

You can’t just declare UFUNCTION like that, this is what your header file should look like:

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"

class UyourBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
	UFUNCTION(BlueprintCallable, Category="Save")
	static bool FileSaveString( FString SaveTextB, FString FileNameB);

	UFUNCTION(BlueprintPure, Category="Save")
	static bool FileLoadString( FString FileNameA, FString& SaveTextA);	

I changed my header and now I have these errors

Sorry I’m asking a lot, I don’t know much about C++ and I really just need this plugin to work

Ah sorry, just drop the GAME_API, or change it to _API

Ok hopefully this is the last thing I need to ask about, but I get this error now.

It seems like it isnt declaring FileLoadString properly and so it can’t read it in the cpp, but I don’t know why it isn’t declaring properly

The first error in your header file at line 6 is because you put you put semicolon (:wink: after UCLASS(), just remove it and it’s done.

And the second error in your header file is because you did notput ampersand (&) in the parameter SaveTextA of function FileLoadString.

I took out the semicolon and it gives me the error c2143. I looked that up and it has to do with semicolon not being present buuuut I have no clue because the semicolon clearly isn’t supposed to be where I put it