Not getting message about invalid word length

All I did was add the code shown in the lecture but the message “The Hidden Word is 4 characters long, try again!” is not showing up at all so I don’t understand what I did wrong. No compile errors in Unreal Engine 4 or errors in Visual Studio Code.

if (Input == HiddenWord)
    {
        PrintLine(TEXT("You have won!"));
    }
    else
    {
        if (Input.Len() != HiddenWord.Len())
        {
            PrintLine(TEXT("The Hidden Word is 4 characters long, try again!"));
        }
        PrintLine(TEXT("You have lost!"));
    }

Could you show your output along with the hidden word?

Actually now I think it was caused by me copying the project folder to a flash drive since I tested it in my original project folder on my PC and it worked fine.

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

Privacy & Terms