Lots of problems with this code. I recommend that you get a basic book or website on C programming and work through the exercises. Function calls and arrays are fundamental concepts - you really have to understand them at least a little to write new code. Reading other arduino sketches can also help.
An array needs to be declared.
int s[14];
You can then remove s1 thru s14, and
foo = s[cs];
will work. You don't need
to set cs to 1, it should start with 0. Then in setup,
s1 = (128);
becomes
s[0] = 128;
The rest of the problems are in the function SelectSlave.
First,
if (foo & 128 >= 128)
looks weird. foo & 128 will only ever have two values: 0 or 128. So it should look like
if (foo & 128 == 128)
or even just
if (foo & 128)
.
The way you have written it, the function SelectSlave is recursive: it calls itself. I don't think that's what you meant to do. Currently, it will also has no stop condition, so sometimes it will
recurse forever, or at least until there is no more memory. You need a loop to find a good value for cs.
while ( s[cs] & 128 == 0) {
cs++;
if (cs > 13)
cs = 0;
}
There is still the problem of what to do if none of the s values are good. You should think about how to handle that.
Anyway, I hope this will get you pointed in the right direction.