'doorlock' does not name a type

what is wrong with the code why won't it compile