Some arguments to Ugens will accept other Ugens, some only accept static data - that is, data known when the synthdef is compiled. The channel count of everything must be static - in other words, it must a language side, not server side.
BufChannels.kr is a dynamic (Ugen/server-side) way of getting the number of channels, what you want to the language side (static) way - b.numChannels.
However you will get sync problems here. Do this instead:
So if I understood you correctly BufChannels is not supposed to be used as an argument to PlayBuf. How can I know (for any ugen) which arguments are supposed to be static, which not? Is this documented any where?
numChannels
Number of channels that the buffer will be. This must be a fixed integer. The architecture of the SynthDef cannot change after it is compiled.
Meaning the value should be static with respect to the synth def.