Cant access "Role" for Multiplayer purpose

Hello, i’m trying to follow this Offical Tutorial and running into the following problem ( in short Role is private ) :

My class inherits the ACharacter class which also inhertits AActor. Due to the Tutorial i can use the Role Variable to check if i am on the server like this Role == ROLE_Authority ;
When doing so i get an error that says Role is a private member of AActor and therfore i cant use it like this.

When searching trough the AActor class i could found there is a GetLocalRole() function which returns Role . But i am still confused because i am follwoing an tutorial for the same Version and am still wondering if i did something wrong or if Role has set private due to Encapsulation and GetLocalRole() is the new way to go

I have the same problem, thank you very much!
The quick start guide seemed not update yet.

yeah, they said on the forum for the docs that they gonna push the updated documentation soon ( could be some days )

In previous versions you would do if (Role == ROLE_Authority), but that’s a protected member now.
So instead you gotta GetLocalRole(), or RemoteRole(), which return ENetRole.
Or directly HasAuthority() which returns a bool.

These are the options on he ENerRole enum

  • ROLE_None
  • ROLE_SimulatedProxy
  • ROLE_AutonomousProxy
  • ROLE_Authority
  • ROLE_MAX

thank for the detailed answer