This is my first time coding in Visual Studio and I have followed the Unreal Programming quick start documentation step by step but I am getting compiler errors. Is their documentation broken or have I done something wrong?
Hey @AdamC_BH ,
I think that this line is wrong in the guide:
if((USceneComponent* ExistingRootComponent = GetRootComponent())
should be
if(USceneComponent* ExistingRootComponent = GetRootComponent())
BUT
If you scroll down you have the finished example without an IF statement.
4 Likes
Hi Adam, welcome to the community. The tutorial you mention says add the following code inside of AFloatingActor::AFloatingActor(), just before the closing bracket, which is the constructor.
You did add this one to the BeginPlay() - so I suggest to first move that to the Constructor, which is the function just above the BeginPlay() and see, if this helps.
And, there seems to be one parenthese , that causes the problem. remove one of these after the if statement, as L1z4rD89 mentioned.
3 Likes