# Calling C++ NetMulticast from Blueprint is bugged

**URL:** <https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, Replication, unreal-engine, question, Blueprint, CPP\
**Created:** [November 5, 2014, 5:50pm UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237 "2014-11-05T17:50:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cobryis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cobryis](https://forums.unrealengine.com/u/Cobryis)\
**Post date:** [November 5, 2014, 5:50pm UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237/1 "2014-11-05T17:50:36Z")

</div>

A parameterized NetMulticast function in C++ that is also BlueprintCallable seems to only properly pass parameter values to one client while other clients just receive 0 values.

Example:

- We have 3 clients connected to a dedicated server.

- _MyGameStateC_ is a C++ class with a NetMulticast function called _BroadcastByte(uint8 InByte)_.

- _BroadcastByte_ is a UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = “MyGame”).

- _MyControllerBP_ is a PlayerController with a To-Server RPC called _BroadcastMyByte_.

- A player calls this event and _BroadcastMyByte_ successfully receives byte (let’s say 0x3).

- Now on server, _BroadcastMyByte_ calls C++ _BroadcastByte_ on a _MyGameStateC_ object.

- Client 1’s _BroadcastByte_ receives 0x3. Client 2’s _BroadcastByte_ receives 0x0. Client 3’s _BroadcastByte_ receives 0x0.

- So why didn’t Clients 2 and 3 receive 0x3?

Client 1 is not a listen server. He’s just only client that happened to receive correct byte.  
I stepped through UE4 in debug and it would appear that a **BlueprintCallable NetMulticast takes a special route instead of C++ route**. This route apparently does not properly package byte to be sent to all clients after it sends it prepares it for first client.  
**Upon discovering this, I simply added another BlueprintCallable C++ function that would call my NetMulticast function, and that fixed issue.** All clients then received correct byte. This is a workaround though, and not a solution.

---

<div class="post-metadata">

**Author:** ![Ryan\_Gerleve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Gerleve](https://forums.unrealengine.com/u/Ryan_Gerleve)\
**Post date:** [November 7, 2014, 9:21pm UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237/2 "2014-11-07T21:21:49Z")

</div>

Thanks for reporting this issue. We’re now tracking this bug internally and will look at fixing it in a future release.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [November 7, 2014, 10:56pm UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237/3 "2014-11-07T22:56:53Z")

</div>

Reported in UE-5191.

---

<div class="post-metadata">

**Author:** ![Ryan\_Gerleve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Gerleve](https://forums.unrealengine.com/u/Ryan_Gerleve)\
**Post date:** [April 9, 2015, 11:26pm UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237/4 "2015-04-09T23:26:20Z")

</div>

Hi Cobryis,

I’ve attempted to recreate this issue, but haven’t been able to reproduce it. Does it still occur in 4.7.5? If so, a small sample project demonstrating issue would be very helpful.

---

<div class="post-metadata">

**Author:** ![Cobryis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cobryis](https://forums.unrealengine.com/u/Cobryis)\
**Post date:** [April 10, 2015, 12:10am UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237/5 "2015-04-10T00:10:11Z")

</div>

Setting UFUNCTION to BlueprintAuthorityOnly results in it only being broadcasted to server from server, so removing that allows for a more accurate reproduction. issue does still exist. I just tested it. Only 1 client got byte 0x3 and rest got 0x0.

---

<div class="post-metadata">

**Author:** ![Cobryis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cobryis](https://forums.unrealengine.com/u/Cobryis)\
**Post date:** [April 10, 2015, 12:14am UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237/6 "2015-04-10T00:14:08Z")

</div>

// Header  
UFUNCTION(BlueprintCallable, Reliable, NetMulticast, Category = UBGameState)  
void BroadcastByte(uint8 InByte);

```
// CPP
void AUBGameState::BroadcastByte_Implementation(uint8 InByte)
{
	UE_LOG(LogTemp, Warning, TEXT("Client recieved: %d"), InByte);
}

```

 ![38264-bptocppmulticastfail.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/0/6c092e482de07be96a552861330980d14bbd5a65.png)

Output:

```
[2015.04.10-00.14.47:650][201]LogTemp:Warning: Client recieved: 3
[2015.04.10-00.14.47:652][201]LogTemp:Warning: Client recieved: 3
[2015.04.10-00.14.47:653][201]LogTemp:Warning: Client recieved: 0
[2015.04.10-00.14.47:655][201]LogTemp:Warning: Client recieved: 0

```

first Log is server, second is 1 client to receive, and other 2 0s are clients receiving 0 when they should be receiving 3.

---

<div class="post-metadata">

**Author:** ![Ryan\_Gerleve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Gerleve](https://forums.unrealengine.com/u/Ryan_Gerleve)\
**Post date:** [April 13, 2015, 11:45pm UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237/7 "2015-04-13T23:45:40Z")

</div>

Thanks for extra information, I was able to reproduce this and we’re working on a fix. There is a bug with how we are processing parameters for a native multicast function when it’s called from Blueprints.

---

<div class="post-metadata">

**Author:** ![Ryan\_Gerleve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Gerleve](https://forums.unrealengine.com/u/Ryan_Gerleve)\
**Post date:** [April 17, 2015, 9:53pm UTC](https://forums.unrealengine.com/t/calling-c-netmulticast-from-blueprint-is-bugged/298237/8 "2015-04-17T21:53:06Z")

</div>

This has now been fixed, and will make it into 4.8. Thanks again for report!
