[SOLVED] Bull Cow keeps Crashing UE 4.26.1

All of a sudden UE now crashes when I made my four letter word a five letter word with the following

I have re-built my code and recompiled every time.
I was using the PrintLine(FString::PrintF(“string”), *variableName)));
I also tried the PrintLine(TEXT(“string”), *variableName)));

I have also commented out the PrintLine in cartridge.h and tried using the FString::Printf
I have deleted the Binaries and Intermediate directories and relaunched.

it still crashes when I click on Play.

How can I proceed ? I obviously can not proceed any further in the course till this is fixed :frowning:

Can you send your code?

I have only put the bear minimum in as done it so many times

Thanks for taking a look

Try putting void StartupGame(); in public and not private.

Still crashes

Your problem is that the game crushes if you type longer word that the hidden word is (correct me if I’m wrong), I’ve had the same problem and I handled it by checking if lenght of the words is longer than index. Here is my solution:

Hi Kovelja009, Unfortunately that is not the case, I do not even get to play the game as soon as I press the Play button Unreal Crashes. I have typed out the solution fully but I have done that so much in testing where it crashes that I just put in the welcome message as that is where the FString is used. Thanks for the help though :slight_smile:

If you want, I can give you my code, so you just erease the parts that you don’t need and continue listening the lectures.

1 Like

Thank you for the offer :slight_smile:
I was up so late last night I am not sure if I downloaded their code from github :confused: so will do that now before pressing on with just listening.

Thank you so much for your help though, it really is appreciated

No problem, I am having similar problem with other game, so I know how frustrating it can be. Good luck and keep practicing :slight_smile:

On line 10 you have %s but the argument you gave is an int not a string, therefore you need %i.

1 Like

Hi Dan,
I pulled the code from the repo and it works. Must of been so tired to of missed that one Could not see the wood for the trees.

Have clicked the solution.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms