# Error with FOV verse code using levels and popup dialog

**URL:** <https://forums.unrealengine.com/t/error-with-fov-verse-code-using-levels-and-popup-dialog/1578368>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite\
**Created:** [January 1, 2024, 6:56am UTC](https://forums.unrealengine.com/t/error-with-fov-verse-code-using-levels-and-popup-dialog/1578368 "2024-01-01T06:56:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajaxfncvbucks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ajaxfncvbucks](https://forums.unrealengine.com/u/ajaxfncvbucks)\
**Post date:** [January 1, 2024, 6:56am UTC](https://forums.unrealengine.com/t/error-with-fov-verse-code-using-levels-and-popup-dialog/1578368/1 "2024-01-01T06:56:49Z")

</div>

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:

```verse

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).
