Failed to load sound "sound\magic\spawned.wav", file probably missing from disk/repository
2 replies, posted
I'm getting this error even though it IS in that place:
[code]
Failed to load sound "sound\magic\spawned.wav", file probably missing from disk/repository
[/code]
I've placed it manually in the garrysmod/sound/magic AND in the addons folder.
Code:
[lua]
function ENT:SpawnFunction( ply, tr )
if ( !tr.Hit ) then return end
local ent = ents.Create("ent_test")
ent:EmitSound("sound/magic/spawned.wav", 500, 200)
ent:SetPos( tr.HitPos + tr.HitNormal * 16 )
ent:Spawn()
ent:Activate()
return ent
end
[/lua]
And for a bonus, this isn't playing and the HUD_PRINTCENTER isn't working.
[lua]
function ENT:OnRemove( )
ent:EmitSound("sound/magic/removed.wav", 500, 200)
PrintMessage(HUD_PRINTCENTER, "Why did you remove the Magic Barrel?!?")
end
[/lua]
Same deal;[code]
Failed to load sound "sound\magic\removed.wav", file probably missing from disk/repository[/code]
That's because most sound functions are relative to the sound directory. Just do magic/remove.wav.
Okay, that fixed the spawn sound. But the ENT:OnRemove() doesn't work still.
[editline]03:19AM[/editline]
the PrintMessage(HUD_PRINTCENTER, "Why did you remove the Magic Barrel?!?") still isn't working,
Sorry, you need to Log In to post a reply to this thread.