ID:994815
 
Code:
mob
proc
// The Proc used to play the sound. CommenceClip(var/Hearers,file,repeat=0,wait,channel,VolChannel="Effect")
if(ismob(Hearers)) for(var/client/C in Hearers:ControlClients)
var/mob/M=C.mob;if(M.vars["Volume[VolChannel]"] && !M.VolumeMuteAll) M<<sound(file,repeat,wait,channel,M.vars["Volume[VolChannel]"])
else for(var/mob/H in Hearers) for(var/client/C in H.ControlClients)
var/mob/M=C.mob;if(M.vars["Volume[VolChannel]"] && !M.VolumeMuteAll) M<<sound(file,repeat,wait,channel,M.vars["Volume[VolChannel]"])



//The fire burning the rubble. usr.CommenceClip(view(),'FieryLooping.ogg',repeat=1,channel=8)


Problem description:
My problem is that the sound...simply does not play. Any suggestions as to why that may be? Is there any fault that somebody may see in this snippet? Thanks in advance!
It looks like you are receiving a list of mobs that are supposed to hear the sound and then attempt to play the sound to them.

What I don't understand is why you are taking this list of mobs, then checking for the associated client for that mob, then accessing that client's mob. That is a waste of a step. You should just send the sound directly to everything in the Hearers list.

mob
proc
CommenceClip(var/Hearers,file,repeat=0,wait,channel,VolChannel="Effect")
if(ismob(Hearers))
if(Hearers.vars["Volume[VolChannel]"] && !Hearers.VolumeMuteAll) Hearers<<sound(file,repeat,wait,channel,Hearers.vars["Volume[VolChannel]"])
else for(var/mob/M in Hearers)
if(M.vars["Volume[VolChannel]"] && !M.VolumeMuteAll) M<<sound(file,repeat,wait,channel,M.vars["Volume[VolChannel]"])


See if this works and let me know