Garry's Mod

Garry's Mod

Sound Muffling Effect
Impulse 7 月 28 日 下午 7:38
https://wiki.facepunch.com/gmod/Global.CreateSound < Breaks sound muffling effect
Someone using my mods was reporting this. Seems like your mod causes an error with entities using CreateSound

[Sound Muffling Effect] lua/sme_modules/server/sme_soundpatch_sv.lua:32: bad argument #1 to 'Send' (Entity expected, got number)
1. Send - [C]:-1
2. CreateSound - lua/sme_modules/server/sme_soundpatch_sv.lua:32
3. unknown - lua/entities/ent_halo_eqp_instantcover.lua:285


[Sound Muffling Effect] lua/sme_modules/server/sme_soundpatch_sv.lua:32: bad argument #1 to 'Send' (Entity expected, got number)
1. Send - [C]:-1
2. CreateSound - lua/sme_modules/server/sme_soundpatch_sv.lua:32
3. unknown - lua/entities/ent_halo_eqp_instantcover.lua:46
4. CallProxies - lua/includes/extensions/entity.lua:339
5. SetActivated - lua/includes/extensions/entity.lua:367
6. v - lua/autorun/imp_halo_hooks.lua:534
7. unknown - lua/includes/modules/hook.lua:102
< >
正在显示第 1 - 6 条,共 6 条留言
sora1d  [开发者] 7 月 29 日 上午 2:08 
Addon link?
Impulse 7 月 29 日 上午 2:27 
The version they were using isn't listed but here's the public version.
They were on a branch of it I have that's updated but I cant release publicly yet.
The equipment items like the deployable cover, Grav lift and power drain should cause it
That being said, if you're going to try to look at the code in my mod it's not going to be the same line
https://steamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2896827442
最后由 Impulse 编辑于; 7 月 29 日 上午 2:29
sora1d  [开发者] 7 月 29 日 上午 3:17 
That's odd. There seems to be sound level and pitch passed into CreateSound? Not sure which addon allows for this.
Impulse 7 月 29 日 上午 11:39 
This is the line of code that was causing your mod to error for reference;
CreateSound(self, "impulse/halo/cover/instantcover_loop/instant_cover"..math.random(1,4)..".wav",80,100)

引用自 sora1d
That's odd. There seems to be sound level and pitch passed into CreateSound? Not sure which addon allows for this.
sora1d  [开发者] 7 月 29 日 下午 6:04 
Yes and that's not possible with vanilla Gmod CreatSound. It only takes in three parameters and the third one is a CRecipientFilter not a number.
Impulse 7 月 29 日 下午 7:58 
引用自 sora1d
Yes and that's not possible with vanilla Gmod CreatSound. It only takes in three parameters and the third one is a CRecipientFilter not a number.
Yeah I realized that earlier. Ill have to go through and check my things that use create sound
< >
正在显示第 1 - 6 条,共 6 条留言
每页显示数: 1530 50