Debug Message for each client is only showing client 0

My “Replicated Vars” per client all say Client 0 instead of client 1 and 2 and 3.






1 Like

Fix Action: Turn off your VPN…

1 Like

I did have a look at this and code is fine. Glad you figured out this stuff. Generally VPNs cause a lot of issues. My wife used a VPN on her phone and while it was off, she could not get any data outside of the home. She removed the software and it fixed the issue.

I am mistaken; I have turned off the VPN, reset the router, and erased and rebuilt from the ground up. I have scoured the internet of Reddit and Unreal Dev and am still clueless.
but I have a new error



this is what im coming to. no idea why theyre client 0


Ok, I’ll try take a look at it. Just in care there are code issues, have you tried grabbing the source from the gitlab? This would eliminate code issues and may just be a setting somewhere.

I cloned GitHub and opened it with this effect. I stopped progressing this course until I found a solution but have been unable. These are errored from the github version of the course. All I did was open it and hit simulate with listen server and 3 players.

I don’t know what to do :frowning:

Do you have steam running?

no

I also had my “Replicated Vars” per client all say Client 0 instead of client 1 and 2 and 3. I didn’t notice until you pointed it out. Good eye! This fixed it for me.

		int32 PlayInEditorID = GPlayInEditorID;
		GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Yellow, FString::Printf(TEXT("Client %d OnRep_ReplicatedVar"), PlayInEditorID));

The UEDocs said that GPlayInEditorID is of type FPlayInEditorID and mentioned int32.


I’m looking at the warning you’re getting. This is the guard code that triggers the warning.

void AActor::SetReplicates(bool bInReplicates)
{ 
	if (GetLocalRole() != ROLE_Authority)
	{
		UE_LOG(LogActor, Warning, TEXT("SetReplicates called on actor '%s' that is not valid for having its role modified."), *GetName());
	}

I tried to reproduce the warning by having a client call SetReplicates(), but no warning. Did you say that you forked Kaan’s project and the warning persist? This is very elusive. Hopefully, it doesn’t happen when we start making the game, like it’s just a demo MyBox issue.

1 Like

This could be an issue with the build, or the engine.

So, first ensure you close the editor and delete the binaries and intermediate folders. Launch again and see if it fixes the problem. This would point to a live coding issue.

Aside from this, it could be an engine install issue. It is rare but not impossible and I’ve seen this once or twice in the past. In this case, close the editor and from the launcher run a repair.if it is mac or Linux, I am not sure how you would do this.

Give those a try and see if it helps.

I progressed and havent seen any persisting issues. I tried opening up the initial map that ends in section 2 but kept getting every client spawning their own server so I was not able to reproduce this particular issue at this time. I will pull another copy from github and try again.

Of your recommendations I did both of those prior to continuing the session. I appreciate the length of pursuit you have had regarding his issue. Thanks :smiley:

Ok, I am at a loss here so if you could remove the binaries and Intermediate folders then zip up the project and upload here: https://gdev.tv/projectupload. I will then be able to take a look and see if I can figure out what is going on.

Hi.

It seems as if they changed the I’d to be a class instead that overloads the int32 cast. This is why, when you cast it, you get the right value. This is the correct solution.

Thanks.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms