CRASH: Verse Code Crashed UEFN Editor Upon Opening Map


using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/UI }
using { /Verse.org/Simulation }
using { /Verse.org/Colors }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/UI }

teleport := class(creative_device):

    @editable
    TeleporterDevice: teleporter_device = teleporter_device{}
    @editable
    TeleporterRoot: creative_prop = creative_prop{}
 
    OnBegin<override>()<suspends>:void=
        AllPlayers := GetPlayspace().GetPlayers()
 
        for(Player : AllPlayers):
            if(FortCharacter := Player.GetFortCharacter[]):
                
                FortCharacter.CrouchedEvent().Subscribe(OnCrouched)
 
   
    OnCrouched(FortCharacter: fort_character, IsCrouching:logic):void=
        if(IsCrouching?):
            DistanceX := FortCharacter.GetTransform().Translation.X
            DistanceY := FortCharacter.GetTransform().Translation.Y
            DistanceZ := FortCharacter.GetTransform().Translation.Z
            var TeleportPos : vector3 = vector3{X:=0.0,Y:=0.0,Z:=0.0}
            PlayerPosition : rotation= FortCharacter.GetTransform().Rotation
            
            if (DistanceZ > 0.0):
                set TeleportPos = vector3 {X:= DistanceX * 1.0, Y:= DistanceY * 1.0, Z:= DistanceZ - 5000.0}
            else:
                set TeleportPos = vector3 {X:= DistanceX * 1.0, Y:= DistanceY * 1.0, Z:= DistanceZ + 5000.0}
            
            if(Agent:=FortCharacter.GetAgent[]):
                TeleportAgentTo(Agent, TeleportPos, PlayerPosition)
            
            
        else:
    TeleportAgentTo(Agent: agent, Translation: vector3, Rotation: rotation):void =

        if(TeleporterRoot.TeleportTo[Translation, Rotation]):
            TeleporterDevice.Teleport(Agent)

        else:

Here is your fixed code. Your OnCrouched Function was incorrect since you cant do FortCharacter:= Agent.GetFortCharacter, in the parameters and also I made all the numbers floats by adding .0 at then end and some other minor mistakes.

This still doesnt really explain why uefn kept crashing instead of showing you your errors and letting you rebuild. Most of the mistakes I found by rebooting uefn many times and looking at the log the verse build errors.