Errors while seeing vars up to zero in "If-else" : I've got problem with UiTextField.

It shows ,,Expected expression", ,,Expression resolves to an unused property", ,,Consecutive statements on a line must be separated by ';'" errors.

I've implemented the function like this:

        if var1 != nil && var2 != nil && var3 != nil {
        
        self.var1.delegate = (self as! UITextFieldDelegate)
        self.var2.delegate = (self as! UITextFieldDelegate)
        self.var3.delegate = (self as! UITextFieldDelegate)
        // Do any additional setup after loading the view.
        } else {
            var1: Double = 0 // <- errors up here
            var2: Double = 0
            var3: Double = 0
    }
}

If I delate the var1 error goes to the line below.

Thanks for help