Garry's Mod

Garry's Mod

Chuck's Weaponry 2.0
Knife Kitty 16 Mar, 2015 @ 4:18am
[info] cl_model.lua:1133: attempt to index upvalue 'vm' (a nil value)
[ERROR] lua/weapons/cw_base/cl_model.lua:1133: attempt to index upvalue 'vm' (a nil value) 1. performViewmodelMovement - lua/weapons/cw_base/cl_model.lua:1133 2. v - lua/weapons/cw_base/cl_hooks.lua:33 3. old_hook_call - lua/includes/modules/hook.lua:84 4. unknown - lua/includes/modules/momo/compat.lua:30

spam of this ^^ error may be caused by using incorrect FireSound or FireSoundSuppressed name

SWEP.FireSound = "NameOfYourSoundWithTypoInIt" causes

[cw20] lua/includes/util.lua:95: bad argument #1 to 'PrecacheSound' (string expected, got nil) 1. PrecacheSound - [C]:-1 2. Sound - lua/includes/util.lua:95 3. unknown - lua/weapons/cw_base/shared.lua:337 4. Give - [C]:-1 5. unknown - gamemodes/sandbox/gamemode/commands.lua:696 6. unknown - lua/includes/modules/concommand.lua:54 [cw20] lua/includes/util.lua:95: bad argument #1 to 'PrecacheSound' (string expected, got nil) 1. PrecacheSound - [C]:-1 2. Sound - lua/includes/util.lua:95 3. unknown - lua/weapons/cw_base/shared.lua:337
during init function and stops it before initializing custom ViewModel

Make sure youve set up your sounds/sound names correctly.
Last edited by Knife Kitty; 16 Mar, 2015 @ 4:28am
< >
Showing 1-7 of 7 comments
RYNN! 16 Jul, 2015 @ 9:17am 
What am I supposed to say to this?
This upvaluevm problem has been a pain in my ass since I STARTED with CW 2.0.
And it's over a sound name?

I just did it on one of my old weapon projects, And it fixed it.

Thanks for sharing this Knife Kitty!
cynaraos 17 Jul, 2015 @ 3:30pm 
i fixed this issue once by changing the sound script name from [WEAPON]_FIRE_SUPPRESSED to [WEAPON]_FIRE_S in the sh_sounds.lua file of the weapon scripts
Last edited by cynaraos; 17 Jul, 2015 @ 3:49pm
Reizuko Zusa 4 Dec, 2017 @ 9:50pm 
[Customizable Weaponry 2.0 Rev75] lua/weapons/cw_base/cl_model.lua:998: bad argument #1 to 'GetBoneMatrix' (number expected, got nil)
1. GetBoneMatrix - [C]:-1
2. getBoneOrientation - lua/weapons/cw_base/cl_model.lua:998
3. _drawAttachmentModel - lua/weapons/cw_base/cl_model.lua:1014
4. _drawAttachmentModels - lua/weapons/cw_base/cl_model.lua:1037
5. drawAttachments - lua/weapons/cw_base/cl_model.lua:1052
6. _drawViewModel - lua/weapons/cw_base/cl_model.lua:751
7. drawViewModel - lua/weapons/cw_base/cl_model.lua:608
8. v - lua/weapons/cw_base/cl_hooks.lua:34
9. unknown - lua/includes/modules/hook.lua:84

how do I fix?
cynaraos 4 Dec, 2017 @ 11:16pm 
make sure you've used the right bone or something?
Dono Donger 22 Apr, 2018 @ 1:32pm 
I've done what cynaraos has done but I am still getting the error.
Priest 6 Oct, 2018 @ 3:13pm 
[ERROR] cw_2.0/lua/weapons/cw_base/cl_model.lua:998: bad argument #1 to 'GetBoneMatrix' (number expected, got nil)
1. GetBoneMatrix - [C]:-1
2. getBoneOrientation - addons/[weapons]_cw_2.0/lua/weapons/cw_base/cl_model.lua:998
3. _drawAttachmentModel - addons/[weapons]_cw_2.0/lua/weapons/cw_base/cl_model.lua:1014
4. _drawAttachmentModels - addons/[weapons]_cw_2.0/lua/weapons/cw_base/cl_model.lua:1037
5. drawAttachments - addons/[weapons]_cw_2.0/lua/weapons/cw_base/cl_model.lua:1052
6. _drawViewModel - addons/[weapons]_cw_2.0/lua/weapons/cw_base/cl_model.lua:751
7. drawViewModel - addons/[weapons]_cw_2.0/lua/weapons/cw_base/cl_model.lua:608
8. v - addons/[weapons]_cw_2.0/lua/weapons/cw_base/cl_hooks.lua:34
9. unknown - lua/includes/modules/hook.lua:84


how do I fix
Crisis 8 Jun, 2020 @ 9:55pm 
[Customizable Weaponry 2.0 Rev75] lua/weapons/cw_base/cl_hooks.lua:54: attempt to compare nil with number
1. v - lua/weapons/cw_base/cl_hooks.lua:54
2. unknown - lua/includes/modules/hook.lua:84

what is this and how do i fix?
< >
Showing 1-7 of 7 comments
Per page: 1530 50