Error Missing ";" in 'variable declaration'

When I try to compile it gives me this error and it specifies line 19 of my Character header.

This is the code under public:

18 UPROPERTY(EditAnywhere, Category = “Weapon”)

19 float weaponRange(1000);

I’m trying to follow this tutorial: Unreal Engine Beginner C++ Tutorial: Building Your First Game - YouTube

What did I mess up?

Of course. I wasn’t paying close enough attention.

I’ve looked over the tutorial and I think you’re using the wrong brackets.

This error message says that you’ve forgotten the semicolon and that’s why the declaration is wrong. Probably because the compiler expected different brackets.

The right code:

float weaponRange{1000};

I am glad to help you.