# Bug: Code compilation not equivalent

**URL:** <https://forums.unrealengine.com/t/bug-code-compilation-not-equivalent/1193541>\
**Category:** Verse\
**Tags:** bug, unreal-editor-for-fortnite, fortnite-creative, fortnite\
**Created:** [June 9, 2023, 6:04am UTC](https://forums.unrealengine.com/t/bug-code-compilation-not-equivalent/1193541 "2023-06-09T06:04:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanx42](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sanx42/32/700965_2.png) [@Sanx42](https://forums.unrealengine.com/u/Sanx42)\
**Post date:** [June 9, 2023, 6:04am UTC](https://forums.unrealengine.com/t/bug-code-compilation-not-equivalent/1193541/1 "2023-06-09T06:04:20Z")

</div>

This compiles and behaves properly

```auto

    LongPause := logic{GetRandomInt(0, 2) = 0};
    var Delay:float = DelayBetweenRounds;
    var Message:message = EndMessage(RoundCount);
    if (LongPause?):
      set Message = EndLongMessage(RoundCount);
      set Delay = LongDelayBetweenRounds;
    ShowText(Message, Agent);
    Sleep(Delay);

```

This compiles and when it runs, the second logger function is called twice.

```auto
    Logger.Print("Pause start {GetSimulationElapsedTime()}");
    LongPause := logic{GetRandomInt(0, 2) = 0};
    if (LongPause?):
      ShowText(EndLongMessage(RoundCount), Agent);
      Sleep(LongDelayBetweenRounds);
    else:
      ShowText(EndMessage(RoundCount), Agent);
      Sleep(DelayBetweenRounds);
    Logger.Print("Pause end {GetSimulationElapsedTime()}");

```

---

<div class="post-metadata">

**Author:** ![PurpleElephant55](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/purpleelephant55/32/698558_2.png) [@PurpleElephant55](https://forums.unrealengine.com/u/PurpleElephant55)\
**Post date:** [June 9, 2023, 1:15pm UTC](https://forums.unrealengine.com/t/bug-code-compilation-not-equivalent/1193541/2 "2023-06-09T13:15:23Z")

</div>

@Sanx42 Thank you for your report! We would like to look into this further, would you be able to submit a bug report using the form available here: [Fortnite Creative](https://creative.fortnite.com/s/bug-report)
