Home Alarm with a 3 wire 4x3 analog keypad nearly done but need some help please

Hi HazardsMind. Thank you. Well done it compiles now and works. I have a few buttons on my keypad that give inconsistent readings though. Take button 4 for example it returns anything from 220-229 so I tried to adapt the "values" array to

int values[12][3] = {{1, 50, 65}, // button 1
                       {2, 90, 110}, // button 2
                     {3, 137, 160}, // button 3
                     {4, 200, 245}, // button 4
                     {5, 300, 350}, // button 5
                     {6, 420, 470}, // button 6
                     {7, 500, 620}, // button 7
                     {8, 700, 745}, // button 8
                     {9, 780, 820}, // button 9
                     {10, 844, 900}, // button *
                     {11, 930, 955}, // button 0
                     {12, 956, 999}}; // button #

The trouble is it didn't work so I am back to square 1 on this but I have learned quite a bit over the last few days.I will have to try again on this.
I have a 7 pin 4x3 keypad which is working fine on my project but, I just need to get this to work now,if nothing else just to show that it can be done. It is a wonder that more of you guys are not using a keypad like this to free up those digital pins. unless of course you are all using "Mega's"
Regards
Jeremy