Proximity Sensor and 5 solenoids

You need to edit that posting (code is unreadable) and
a) use the # button to get proper code tags to quote the code
b) ensure it isn't getting mangled in the copy/paste operation (preview to make sure)