12 keys keypad, library error when uploading!!

I suggest you to use a multimeter to check if you got 4 row by 3 column or 3 row by 4 column instead. The look is deceiving. Your symptom tells me you might have treated a column pin as a row pin.