sound.Play Issue

local sound = Sound(“perp2.5/metal_detector.mp3”)
local function metalDetectorUMsg ( uMsg )
local ent = uMsg:ReadEntity()

sound.Play(sound, ent:GetPos(), 100, 100)         --<--- This line I get  [ERROR]  bad key to string index (number expected, got string)


[lua]local sound = “perp2.5/metal_detector.mp3” [/lua]

I have went there but still unsure on the error.

[editline]4th January 2013[/editline]

I am getting the error still :confused:

You made sound a string and tried to do sound.Play; basically doing “perp2.5/metal_detector.mp3”.Play(…)

Thanks but it turned out the string sound was conflicting with the way Garry had it in gmod 12 Sound("")

Sound(snd) just calls util.PrecacheSound(snd) then returns snd.