Problem with Fortnite Verse

So I want to make a Fortnite map based on a Roblox game named Escape Tsunami For Brainrots! and im stuck on the script/verse for the Waves/Tsunamis. I have a whole code but there is always 1 Error in it and if i try to fix this 1 Error there comes another one till i think i everything and then the whole script is red, so there is always 1 or more Errors. The first Error of all comes when i have the whole code done and is in the Picture. I would be thankfull if someone could help me! And here is the wohle code:

using { /Fortnite.com/Devices }
using { /Verse.org/Random }
using { /Verse.org/Simulation }

tsunami_speed := enum:
    super_slow
    slow
    medium
    fast
    super_fast
    lightning

wave_data := struct:
    Mesh : creative_prop
    Damages : []damage_volume_device
    Text : billboard_device
    Active : logic

TsunamiManager := class(creative_device):

    @editable
    Waves : []wave_data

    @editable
    SpawnLocation : vector3

    @editable
    DespawnX : float = 500.0   

    SpawnMin : float = 3.0
    SpawnMax : float = 30.0

    OnBegin<override>()<suspends>:void =
        for (W : Waves):
            W.Active = false

        loop:
            SpawnWave()
            Sleep(GetRandomFloat(SpawnMin, SpawnMax))

    SpawnWave()<suspends>:void =
        W := GetFreeWave()
        if (!W?):
            return

        SpeedType := GetRandomSpeed()
        SetupWave(W, SpeedType)
        MoveWave(W, SpeedType)

    GetFreeWave():?wave_data =
        for (W : Waves):
            if (!W.Active):
                W.Active = true
                return W
        return false

    SetupWave(W:wave_data, Speed:tsunami_speed):void =
        Text : string
        Color : linear_color
        Scale : vector3

        match(Speed):
            tsunami_speed.super_slow =>
                Text := "SUPER SLOW"
                Color := linear_color{B:=1.0}
                Scale := vector3{2.0,1.0,1.0}
            tsunami_speed.slow =>
                Text := "SLOW"
                Color := linear_color{B:=1.0}
                Scale := vector3{2.0,1.0,1.0}
            tsunami_speed.medium =>
                Text := "MEDIUM"
                Color := linear_color{G:=1.0}
                Scale := vector3{3.0,1.5,1.5}
            tsunami_speed.fast =>
                Text := "FAST"
                Color := linear_color{R:=1.0}
                Scale := vector3{4.0,2.0,2.0}
            tsunami_speed.super_fast =>
                Text := "SUPER FAST"
                Color := linear_color{R:=1.0}
                Scale := vector3{4.0,2.0,2.0}
            tsunami_speed.lightning =>
                Text := "LIGHTNING"
                Color := linear_color{R:=0.5,B:=0.5}
                Scale := vector3{6.0,3.0,3.0}

        W.Mesh.SetTransform(transform{
            Translation := SpawnLocation,
            Scale := Scale
        })

        W.Text.SetText(Text)
        W.Text.SetTextColor(Color)
        W.Text.SetTransform(transform{
            Translation := SpawnLocation + vector3{Z:=300.0}
        })

        for (D : W.Damages):
            D.SetTransform(transform{Translation := SpawnLocation})

    MoveWave(W:wave_data, SpeedType:tsunami_speed)<suspends>:void =
        Speed :=
            match(SpeedType):
                tsunami_speed.super_slow => 200.0
                tsunami_speed.slow => 400.0
                tsunami_speed.medium => 600.0
                tsunami_speed.fast => 900.0
                tsunami_speed.super_fast => 1200.0
                _ => 1600.0

        loop:
            Pos := W.Mesh.GetTransform().Translation
            NewX := Pos.X - Speed * GetDeltaTime()

            NewPos := vector3{X:=NewX,Y:=Pos.Y,Z:=Pos.Z}

            W.Mesh.MoveTo(NewPos, rotation{}, 0.0)
            W.Text.MoveTo(NewPos + vector3{Z:=300.0}, rotation{}, 0.0)

            for (D : W.Damages):
                D.MoveTo(NewPos, rotation{}, 0.0)

            if (NewX <= DespawnX):
                W.Active = false
                break

            Sleep(0.0)

    GetRandomSpeed():tsunami_speed =
        match(GetRandomInt(0,5)):
            0 => tsunami_speed.super_slow
            1 => tsunami_speed.slow
            2 => tsunami_speed.medium
            3 => tsunami_speed.fast
            4 => tsunami_speed.super_fast
            _ => tsunami_speed.lightning

Hello! I had some time so tried fixing it, has a lot of changes just to compile.
And some parts of the code had to suppress it or change it so it adjust to something that could work, you would need to test it out, and modify it.

Added some comments on what I changed and why.
Hope it helps, cheers.

using { /Fortnite.com/Devices }
using { /Verse.org/Random }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath } #Added using for vector3 math.


StringToMessage<localizes>(String:string):message= {"{String}"}

tsunami_speed := enum:
    super_slow
    slow
    medium
    fast
    super_fast
    lightning

wave_data := class<concrete>: #added "<concrete>" to it can appear in editor ui, changed struct to class because it needs mutable members
    @editable #added editable so it appears in editor ui
    Mesh : creative_prop = creative_prop{} # added "creative_prop{}" initialization
    @editable #added editable so it appears in editor ui
    Damages : []damage_volume_device = array{} # added "array{}" initialization
    @editable #added editable so it appears in editor ui
    Text : billboard_device = billboard_device{} # added "billboard_device{}" initialization
    var Active : logic = false


TsunamiManager := class(creative_device):

    @editable
    Waves : []wave_data= array{} #Added "=array{}" need initialization.

    @editable
    SpawnLocation : vector3 = vector3{} #Added "=vector3{}" need initialization

    @editable
    DespawnX : float = 500.0   

    SpawnMin : float = 3.0
    SpawnMax : float = 30.0

    OnBegin<override>()<suspends>:void =
        for (W : Waves):
            set W.Active = false #for this to be mutable needed to change struct to class and added the "set" before line.

        loop:
            SpawnWave()
            Sleep(GetRandomFloat(SpawnMin, SpawnMax))

    SpawnWave()<suspends>:void=
        W := GetFreeWave()
        if (ActualWave :=  W?):#changed if to comply with the wave exists, then use in the setup calls with and actual wave and not option.
            SpeedType := GetRandomSpeed()
            SetupWave(ActualWave, SpeedType)
            MoveWave(ActualWave, SpeedType)
        

      
    GetFreeWave():?wave_data =
        for (W : Waves):
            if (not W.Active?): # <- replaced ! with "not" and added "?" at the end
                set W.Active = true
                return option { W } #Added "option { W }" to comply with return type.
        return false

    SetupWave(W:wave_data, Speed:tsunami_speed):void =
        var Text : string ="" #added "var" and initial value.
        #var Color : linear_color # this is not available maybe what color? or named colors from verse?
        var Scale : vector3 = vector3 {}#added "var" and initial value.

        case(Speed):#changed "match" to "case" is the switch in Verse
            tsunami_speed.super_slow =>
                set Text = "SUPER SLOW"
                #Color = linear_color{B:=1.0}
                set Scale = vector3{X:=2.0, Y:=1.0, Z:=1.0}
            tsunami_speed.slow =>
                set Text = "SLOW"
                #Color = linear_color{B:=1.0}
                set Scale = vector3{X:=2.0, Y:=1.0, Z:=1.0}
            tsunami_speed.medium =>
                set Text = "MEDIUM"
                #Color = linear_color{G:=1.0}
                set Scale = vector3{X:=3.0, Y:=1.5, Z:=1.5}
            tsunami_speed.fast =>
                set Text = "FAST"
                #Color = linear_color{R:=1.0}
                set Scale = vector3{X:=4.0, Y:=2.0, Z:=2.0}
            tsunami_speed.super_fast =>
                set Text = "SUPER FAST"
                #Color = linear_color{R:=1.0}
                set Scale = vector3{X:=4.0, Y:=2.0, Z:=2.0}
            tsunami_speed.lightning =>
                set Text = "LIGHTNING"
                #Color = linear_color{R:=0.5,B:=0.5}
                set Scale = vector3{X:=6.0, Y:=3.0, Z:=3.0}


        <# This method is not available you would need to use MoveTo, or TeleportTo[]       
        W.Mesh.SetTransform(transform{
            Translation := SpawnLocation,
            Scale := Scale
        })#>
        TransformToTeleport := transform{
            Translation := SpawnLocation,
            Rotation := W.Mesh.GetTransform().Rotation,
            Scale := Scale
        }
        if(W.Mesh.TeleportTo[TransformToTeleport]):
            Print("Teleport succeded")

        <#  This can't use a string, it need a to pass por a localized method.
        W.Text.SetText(Text)
        #>
        Message := StringToMessage(Text)
        W.Text.SetText(Message)
        #W.Text.SetTextColor(Color) #This method is not accesible via verse.


        <# Replaced with lines below.
        W.Text.SetTransform(transform{
            Translation := SpawnLocation + vector3{Z:=300.0}
        })#>      
        var BillboardTransform : transform = W.Text.GetTransform()  
        set BillboardTransform.Translation =  SpawnLocation + vector3{Z:=300.0}

        if(W.Text.TeleportTo[BillboardTransform]):


        
        for (D : W.Damages):
            #D.SetTransform(transform{Translation := SpawnLocation}) # replaced with lines below
            var DamageTransform : transform = D.GetTransform()
            set DamageTransform.Translation = SpawnLocation
            if(D.TeleportTo[DamageTransform]):

    <# Replaced with method below but move to already, has a time, so you would need to calculate time, with distance you want to travel based on that speed.
    MoveWave(W:wave_data, SpeedType:tsunami_speed)<suspends>:void =
        Speed :=
            case(SpeedType):#changed match to "case"
                tsunami_speed.super_slow => 200.0
                tsunami_speed.slow => 400.0
                tsunami_speed.medium => 600.0
                tsunami_speed.fast => 900.0
                tsunami_speed.super_fast => 1200.0
                _ => 1600.0

        loop:
            Pos := W.Mesh.GetTransform().Translation
            NewX := Pos.X - Speed * GetDeltaTime()

            NewPos := vector3{X:=NewX,Y:=Pos.Y,Z:=Pos.Z}

            W.Mesh.MoveTo(NewPos, rotation{}, 0.0)
            W.Text.MoveTo(NewPos + vector3{Z:=300.0}, rotation{}, 0.0)

            for (D : W.Damages):
                D.MoveTo(NewPos, rotation{}, 0.0)

            if (NewX <= DespawnX):
                set W.Active = false
                break

            Sleep(0.0)#>


    #This is my own approach to the movewave. 
    MoveWave(W:wave_data, SpeedType:tsunami_speed)<suspends>:void=
        Speed :=
            case(SpeedType):#changed match to "case"
                tsunami_speed.super_slow => 200.0 
                tsunami_speed.slow => 400.0
                tsunami_speed.medium => 600.0
                tsunami_speed.fast => 900.0
                tsunami_speed.super_fast => 1200.0
                _ => 1600.0

        Pos := W.Mesh.GetTransform().Translation
        NewPos := vector3{X:=DespawnX, Y:=Pos.Y, Z:=Pos.Z}
        MeshRotation : rotation = W.Mesh.GetTransform().Rotation
        MoveTime : float = CalculateMoveTime(Pos.X, DespawnX, Speed)
        spawn: #Spawning move to, so everything moves in the same frame and not one after the other.
            W.Mesh.MoveTo(NewPos, MeshRotation, MoveTime)
        TextRotation : rotation =  W.Text.GetTransform().Rotation
        spawn:  #Spawning move to, so everything moves in the same frame and not one after the other.
            W.Text.MoveTo(NewPos + vector3{Z:=300.0},TextRotation, MoveTime)
        for (D : W.Damages):
            DRotation :rotation = D.GetTransform().Rotation 
            spawn:  #Spawning move to, so everything moves in the same frame and not one after the other.
                D.MoveTo(NewPos, DRotation, 0.0)
        Sleep(MoveTime)
        set W.Active = false

    CalculateMoveTime(Start:float, End:float, Speed:float):float=
        #I'm assuming speed it's in cm/s 
        AbsoluteDistance : float = Abs(End - Start)
        Time := AbsoluteDistance / Speed
        return Time

    GetRandomSpeed():tsunami_speed =
        case(GetRandomInt(0,5)):#changed "match" to "case"`3
            0 => tsunami_speed.super_slow
            1 => tsunami_speed.slow
            2 => tsunami_speed.medium
            3 => tsunami_speed.fast
            4 => tsunami_speed.super_fast
            _ => tsunami_speed.lightning