Syntax error quick question

Hello

Unlike Unrealscript that uses the dot operator for accessing public data or protected (if derived) from a class, C++ has the option to use the arrow operator provided that the left operand is a pointer to a class/structure or union but also has the option to use the dot operator. The reason for using the arrow operator is due to operator precedence, the dot operator has a higher precedence than the dereference operator (the star) so essentially the pointer is not being dereferenced first unless parenthesis are used, hence PointerToClass->Variable is equivalent to ( *PointerToClass ).Variable, the missing semicolon error occurs because you are trying to dereference and access a variable from the class name but not a pointer to the class and declaring the class name with a semicolon is legal in C++ i.e. APawn; is legal, though it’s not something that will help you in this case. As said above using ‘Pawn’ the pointer to APawn should enable you to access FaceRotation.

I should also add that Pawn is private and not protected hence in this case, you’ll have to use a getter, GetPawn() is what you’re looking for.

Thanks.