'doorlock' does not name a type

UKHeliBob:
I am sure that D_G meant please post complete code if you want complete help.

What part of that isn't clear?