# Can ACharacter have two UActorComponents that have RPC calls?

**URL:** <https://forums.unrealengine.com/t/can-acharacter-have-two-uactorcomponents-that-have-rpc-calls/730974>\
**Category:** C++\
**Tags:** rpc, unreal-engine\
**Created:** [December 18, 2022, 7:13am UTC](https://forums.unrealengine.com/t/can-acharacter-have-two-uactorcomponents-that-have-rpc-calls/730974 "2022-12-18T07:13:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m00nB33r](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/m00nb33r/32/88714_2.png) [@m00nB33r](https://forums.unrealengine.com/u/m00nB33r)\
**Post date:** [December 18, 2022, 7:13am UTC](https://forums.unrealengine.com/t/can-acharacter-have-two-uactorcomponents-that-have-rpc-calls/730974/1 "2022-12-18T07:13:01Z")

</div>

I have an issue where I’m getting linker errors…

I have a C++ class that inherits from ACharacter.  
I have two C++ UActorComponents classes. First one I have been working with for several days no problems with RPC calls.

Started to build out the second C++ UActorComponent based class. Compiled fine until I started to add RPC calls… When I did I got an error saying:

```auto
Error	LNK2005	"protected: void __cdecl UBattleComponent::BattleServerRPC_SetAiming(bool)" (?BattleServerRPC_SetAiming@UBattleComponent@@IEAAX_N@Z) already defined in BattleComponent.gen.cpp.obj

```

I’ve deleted all generated files, re-generated visual studio project files… Still getting this same error.

---

<div class="post-metadata">

**Author:** ![Nathaniel3W](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nathaniel3W](https://forums.unrealengine.com/u/Nathaniel3W)\
**Post date:** [December 18, 2022, 1:07pm UTC](https://forums.unrealengine.com/t/can-acharacter-have-two-uactorcomponents-that-have-rpc-calls/730974/2 "2022-12-18T13:07:21Z")

</div>

You posted this question under Legacy/UDK Programming and UnrealScript. This section is for programming in Unreal Engine 3 or the Unreal Development Kit, which was a version of Unreal Engine 3. You’ll have better luck with your question if you move it to a different section of the forum.

---

<div class="post-metadata">

**Author:** ![m00nB33r](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/m00nb33r/32/88714_2.png) [@m00nB33r](https://forums.unrealengine.com/u/m00nB33r)\
**Post date:** [December 18, 2022, 3:24pm UTC](https://forums.unrealengine.com/t/can-acharacter-have-two-uactorcomponents-that-have-rpc-calls/730974/3 "2022-12-18T15:24:07Z")

</div>

Oh thank you… I didn’t realize I posted it here. It was very late last night and had been dealing with odd issues for some 8 hours straight.

Thanks!
