Error with FOV verse code using levels and popup dialog

so this fov code from a richytoons video, it used a trigger, and i want to make a ui for it, so i tried to edit the code, but im getting an error, (im a new user for verse, i have past programming experence)
heres my code:


using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Characters}
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.

# A Verse-authored creative device that can be placed in a level
Fov := class(creative_device):
    @editable
    popupDialog : popup_dialog_device = popup_dialog_device{}
 
    @editable
    Level : cinematic_sequence_device = cinematic_sequence_device{}
 
 
    OnBegin<override>()<suspends>:void=
        popupDialog.RespondingButtonEvent.Subscribe(PopUpPress)
 
    PopUpPress(Agent : agent, Number : int) : void =
        if (Number := 1):
            StartLevel(Agent)

    StartLevel( Agent: agent) : void=
        if (PlayerAgent:= Agent, FortChar := PlayerAgent.GetFortCharacter[]):
            FortChar.PutInStasis(stasis_args{AllowTurning := true, AllowFalling:= true, AllowEmotes := true})
            spawn:
                LevelSeq(FortChar)
 
 
    LevelSeq(FortChar : fort_character)<suspends>:void=
        Level.Play()
        Sleep(300.0)
        Level.Stop()
        FortChar.ReleaseFromStasis()

the error is on line 21, at the if statement checking the button number, the error is: Expected an expression that can fail in the ‘if’ condition clause (3513).