USTRUCT - Problem with GENERATED_USTRUCT_BODY()

Sorry as well for an old post, but this was the most recent search result. I’ve got a similar problem, except the problem isn’t with Intellisense, so the work around doesn’t help. In my case Intellisense is not false reporting, but accurately predicting compilation failures.

I’m just following the example here: Data Driven Gameplay Elements in Unreal Engine | Unreal Engine 5.3 Documentation

A lot of the identifiers are reported as undefined, starting with:
Error (active) explicit type is missing (‘int’ assumed) (Line 2: USTRUCT(BlueprintType))
Error (active) identifier “BlueprintType” is undefined (also Line 2)
Error (active) identifier “GENERATED_USTRUCT_BODY” is undefined (line 4 in the link)

Even:
Error (active) identifier “UPROPERTY” is undefined

That last is particularly odd. The error triggers on the 2nd one, NOT the first occurance. UPROPERTY is recognized with the first occurrence. Only after that, it and all its properties are reported as undefined (even when they’re exactly the same).

There’s so much reported wrong (including missing { or ; where none exist in the example) it leads me to wonder if this code has been deprecated, or if the example is otherwise out of date. However, the structure matches the OP’s post, except for unimportant line returns in the example, so I expect it was correct at some point in time.

Edit: Found some updated code here: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Even though I’m using 4.12.2, I tried it. However, doing so results in GENERATED_BODY being reported as undefined. So, no real change in behavior.