'doorlock' does not name a type

tyty1107:
Sorry, but what is codenif.

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