Yep, Arngrim is 100% correct.
It almost seems like the if surround thing was meant as a compatibility switch, but it doesn't really work because there are no checks around some of the later calls to PlaySound that actually use the new parameter. The SoundFX call is compatible with everything else that's going on, so there's no need to break it out that way.
In tables like WCS that I added surround to, I added a check like this. It allows the code to run without modification on 10.3.
if tablewpc94.VersionMinor > 3 OR tablewpc94.VersionMajor > 10 Then
PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
else
PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
end if
Edited by DJRobX, 19 August 2017 - 06:11 AM.