Loads of Syntax Errors when trying to Include GameplayStatistics.h


Well I feel silly, but I literally just solved it right as I was clicking upload, and it’s all from the screenshot I used.

KismetSystemLibrary defines a function PrintWarning, and a macro I defined the other day for simplifying a print string routine I named “PrintWarning”, so of course this would cause errors rofl.

My apologies, this issue has been resolved.


Hey there, so I’m running into an odd issue.

I need to utilize the UGameplayStatistics class to get the camera’s world rotation, but when I include the #include "Kismet/GameplayStatics.h"
header and try to rebuild/boot UE5 from visual studio, i get syntax errors in KismetSystemLibrary.h:

When I open this file to view the problem I see this:

Pretty much no line in this file does not have an error.
I’ve been unable to find a solution to this. Anyone have advice?

I recommend setting up custom hotkeys for frequently used functions rather than trying to simplify the existing syntax, especially with macros.