Replication problem

Hi all, I have problem when trying to replicate properties. I know replication wiki site and documentation, but i still cannot solve this problem :frowning:

Whenever I try to use DOREPLIFETIME compiller fails.



DOREPLIFETIME(AMurnatanPlayerState, TeamNumber);


I am using shooter example as my reference, this code produce following errors



1>D:\dev\workspace\unrealengine\Murnatan\Source\Murnatan\MurnatanPlayerState.cpp(88): error C2275: 'AMurnatanPlayerState' : illegal use of this type as an expression
1>D:\dev\workspace\unrealengine\Murnatan\Source\Murnatan\MurnatanPlayerState.cpp(88): error C3861: 'DOREPLIFETIME': identifier not found


Anyone got an idea why i cannot compile this example?

Thanks for help :wink:

This was answered in another thread here:

But I didn’t want anyone here to miss it, so the quick answer is to include:


#include "Net/UnrealNetwork.h"

6 Likes

It worked fine.

2 Likes