Multiplayer

I have a question

Working on a small project and I am having a small issue.

When I am trying to “Withdraw from the ATM”, the money is being added to the Server player and not the client that is making the withdraw. I have attached a picture of my current set up. Everything starts at the Withdraw_UI

Thank you for the assistance.



Can you show code for this macro
image

So there’s your problem, you are using generic “GetPlayerCharacter(0)” which is a non-contextual node that returns the character of the first available playercontroller on the machine.

Using this node is fine in client-side code (eg. UI code), but generally not in server code.

In your case, once you are on server you should pass around the player doing the withdraw, like this :

image

Is that supposed to be a reference to the Third Person Character? Because it’s not letting add the self ref object.

Self is the controller.
Get the pawn via GetControlledPawn and cast to your character class.

1 Like

Thank you. I was able to fix that problem.

Just ran into another one.

Thanks for this valuable information. Its help me in fixing my problem as well. This thread is very helpful.

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