sound.PlayURL() Does not exist

With this call


sound:PlayURL("http://www.mysite.com/mysound.mp3", "play", function(a) end)

I received this message


[ERROR] addons/test/lua/autorun/server/test.lua:28: attempt to call method 'PlayURL' (a nil value)
  1. unknown - addons/test/lua/autorun/server/test.lua:28


So I printed the table and saw that it really did not exist


Add	=	function: 0x0e591e20
AddSoundOverrides	=	function: 0x0e591da0
Play	=	function: 0x0e591e58

Why is sound:PlayURL() missing when it is in the wiki?
Is there a new method for streaming music?

first of all, if you’re calling a library function, you do “library.function()” not “library:function()”

make sure you are calling it from the client and not the server. if you look at the bottom of each wiki page for a function, there is “shared,” “server,” or “client.” shared is for both server and client, and the other two are self-explanatory.

if this is being called from a shared.lua file, and you have server only code, wrap them in a “if SERVER then” statement, “if CLIENT then” for client.

That explains it, thanks!