# Using Vector2i as a Map Key Causes Character Freeze and Disconnection

**URL:** <https://forums.unrealengine.com/t/using-vector2i-as-a-map-key-causes-character-freeze-and-disconnection/2479297>\
**Category:** Issues and Bug Reporting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, fortnite\
**Created:** [April 28, 2025, 5:40am UTC](https://forums.unrealengine.com/t/using-vector2i-as-a-map-key-causes-character-freeze-and-disconnection/2479297 "2025-04-28T05:40:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uxibeo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Uxibeo](https://forums.unrealengine.com/u/Uxibeo)\
**Post date:** [April 28, 2025, 5:40am UTC](https://forums.unrealengine.com/t/using-vector2i-as-a-map-key-causes-character-freeze-and-disconnection/2479297/1 "2025-04-28T05:40:02Z")

</div>

### Summary

Using a Vector2i as a key in a map causes the character to freeze and disconnect from the game when interacting with the map during gameplay. No Verse errors are thrown, making the issue difficult to debug

### Please select what you are reporting on:

Verse

### What Type of Bug are you experiencing?

Verse

### Steps to Reproduce

1. Use the device below
2. Compile the Verse code.
3. Link input device to the device below
4. Start the game.
5. Move the character around normally.
6. Press the E key to trigger the code that uses the map with the `Vector2i` key.
7. Observe the character freezing and the disconnect behavior.

```verse
using { /UnrealEngine.com/Temporary/SpatialMath}
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

hello_world_device := class(creative_device):
    @editable
    Input: input_trigger_device = input_trigger_device{}

    OnBegin<override>()<suspends>:void=
        MyClass: my_class = my_class{}
        loop:
            Input.PressedEvent.Await()
            Print("Begin Func")
            MyClass.Func()

my_class := class:
    var AAA: [vector2i]int = map{}
    Func():void=
        for:
            X := 1..1
            Y := 1..1
        do:
            Vec := vector2i{X:=X,Y:=Y}
            if(set AAA[Vec] = 1):
                Print("set ok: {X}-{Y}")
            else:
                Print("set failed: {X}-{Y}")

```

### Expected Result

The character should move normally after pressing the E key, and no disconnect or freezing should occur when using Vector2i as a map key

### Observed Result

After pressing the E key, the character immediately freezes and becomes unresponsive. Shortly after, a red disconnect error appears in the UEFN log, and the player is kicked back to the Fortnite lobby without any Verse error message.

### Platform(s)

Windows

### Video

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/c/9bc4214aca4cc96c30da80c418ebb1e850b29875.jpeg "UEFN Bug: Using Vector2i as Map Key Causes Character Freeze and Disconnect") ](https://www.youtube.com/watch?v=FOgiJl8RwDM)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 25, 2025, 5:40am UTC](https://forums.unrealengine.com/t/using-vector2i-as-a-map-key-causes-character-freeze-and-disconnection/2479297/2 "2025-10-25T05:40:07Z")

</div>

This topic was automatically closed after 180 days. New replies are no longer allowed.
