Arduino Coding Serial Error

I need to collect at least 4 characters, as it will be a 4 digit passcode to unlock the system