# Macro Makes Build Fail

**URL:** <https://forums.unrealengine.com/t/macro-makes-build-fail/339247>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, bug-report, build-failed, UE4, question, Blueprint\
**Created:** [November 21, 2015, 1:49pm UTC](https://forums.unrealengine.com/t/macro-makes-build-fail/339247 "2015-11-21T13:49:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![OmniOwl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OmniOwl](https://forums.unrealengine.com/u/OmniOwl)\
**Post date:** [November 21, 2015, 1:49pm UTC](https://forums.unrealengine.com/t/macro-makes-build-fail/339247/1 "2015-11-21T13:49:25Z")

</div>

So it appears that my simple macro makes the game unable to build:

```
LogBlueprint:Error: [compiler h_Spawner] Error The type of Target Array is undetermined. Connect something to Get Random Array Element to imply a specific type.
[2015.11.21-13.25.14:261][0]LogInit:Display: LogBlueprint:Error: [compiler h_Spawner] Error The type of Item is undetermined. Connect something to Get Random Array Element to imply a specific type.

```

[http://puu.sh/ltooh/75ffcf15c4.png](http://puu.sh/ltooh/75ffcf15c4.png)

In order to get around it, I just had to take the contents of the macro and put it in my blueprint. But that sort of defeats the purpose as I fetch a random element from an array in different places which would make a macro ideal.

---

<div class="post-metadata">

**Author:** ![Stormrage256](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/stormrage256/32/1008648_2.png) [@Stormrage256](https://forums.unrealengine.com/u/Stormrage256)\
**Post date:** [November 22, 2015, 6:42am UTC](https://forums.unrealengine.com/t/macro-makes-build-fail/339247/2 "2015-11-22T06:42:50Z")

</div>

I’ve had the exact same issue while using the same macro in v4.10. It’s causing the packaging process to fail. And the error message appears even if all the array connections are made correctly and working both in PIE and standalone.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [November 23, 2015, 10:26pm UTC](https://forums.unrealengine.com/t/macro-makes-build-fail/339247/3 "2015-11-23T22:26:22Z")

</div>

Hey,

Please attach your packaging as a .txt file to your next reply. With that being said, would you mind either a.) including your blueprint example or b.) providing the full blueprint example. I’d also like to see if you have any compiling or saving errors as well.

Looking forward to hearing back from you, thanks!

---

<div class="post-metadata">

**Author:** ![Stormrage256](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/stormrage256/32/1008648_2.png) [@Stormrage256](https://forums.unrealengine.com/u/Stormrage256)\
**Post date:** [November 27, 2015, 12:29pm UTC](https://forums.unrealengine.com/t/macro-makes-build-fail/339247/4 "2015-11-27T12:29:14Z")

</div>

Hi , I’ve attached both the packaging as well as the link to a blueprint example project below:

[PackageLog][1]

link: [BugRepro][2]

[68409-package\_failreport.txt](https://forums.unrealengine.com/uploads/short-url/hTgtf7UzQTtCgwcpXNo5sNww5rw.txt) (388 KB)  
[2]: [https://www](https://www)…com/s/u7yns5igh0ev3mp/MacroBugTest.zip?dl=0

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [November 30, 2015, 9:47pm UTC](https://forums.unrealengine.com/t/macro-makes-build-fail/339247/5 "2015-11-30T21:47:38Z")

</div>

Hey Vipar and Stormrage256,

Thank you for your help with finding this bug. I have submitted a . You can reference the bug as UE-23933. Please feel free to check in on this bug in the future.
