'doorlock' does not name a type

tyty1107:
i'm sorry, the week i have been trying to learn but non of it is sticking so i have idea what anything means.

Let's keep it simple.

Post your complete program not just part of it.