bDoor = “” initializes the variable as a string, bDoor = 0 as numeric. It could cause a problem if the request fails, and you compare an integer against the string variable.
All the variables are needed in the request expression, altough you can use shorter names for the unneeded ones.
The last parameters expression is not needed, your bDoor is a variable.
Library Platform, Software Engineer