I have the following if statement inside a trigger and the first part of the statement should be true and set "AllCloseToHome" to true and "AllNotCloseToHome" to false. However, it keeps setting both to false. I have even tried just using one variable value and it still sets both variables to false.
if value of variable "1JCloseToHome" is true and value of variable "1PCloseToHome" is true and value of variable "1ECloseToHome" is true and value of variable "1SCloseToHome" is true then
set value of variable "AllCloseToHome" to true
set value of variable "AllNotCloseToHome" to false
else if not (value of variable "1JCloseToHome") and not (value of variable "1PCloseToHome") and not (value of variable "1ECloseToHome") and not (value of variable "1SCloseToHome") then
set value of variable "AllCloseToHome" to false
set value of variable "AllNotCloseToHome" to true
else
set value of variable "AllCloseToHome" to false
set value of variable "AllNotCloseToHome" to false
end if