Garry's Mod

Garry's Mod

[ArcCW] Arctic's Customizable Weapons (Base)
npcs shooting creates an error
it says this in the console: [[ArcCW] Arctic's Customizable Weapons (Base)] lua/weapons/arccw_base/sh_attach.lua:684: attempt to call method 'GetViewModel' (a nil value)
1. unknown - lua/weapons/arccw_base/sh_attach.lua:684 (x8)
< >
Showing 1-15 of 25 comments
SCAREDCROWS 1 Oct, 2023 @ 6:48am 
same
Same here. Gonna stop using the base until it gets updated
AND having NPC attachments will cause errors too
Lt. Nazrin 12 Oct, 2023 @ 6:44am 
has this ever been fixed lol
Spider_Phoenix045 16 Oct, 2023 @ 8:27am 
Sorry for the late reply.. and no. The update in July still didn't fix the NPC crap.
Lt. Nazrin 31 Oct, 2023 @ 4:52am 
why does this happen in the first place? im guessing its trying to give a viewmodel to an npc which doesnt work?
Lt. Nazrin 31 Oct, 2023 @ 5:05am 
function SWEP:GetTracerOrigin()
local ow = self:GetOwner()
local wm = !ow:GetViewModel():IsValid() or ow:ShouldDrawLocalPlayer()
local muzz = self:GetMuzzleDevice(wm)

if muzz and muzz:IsValid() then
local posang = muzz:GetAttachment(self:GetBuff_Override("Override_MuzzleEffectAttachment", self.MuzzleEffectAttachment) or 1)
if !posang then return muzz:GetPos() end
local pos = posang.Pos

now im thinking its possibly the base trying to get the position of the guns tracer from the npc thats causing this?
Lt. Nazrin 31 Oct, 2023 @ 5:06am 
dude i swear to god if its because "!ow:GetViewModel():IsValid()" should be changed to "!ow:GetWorldModel():IsValid()"
Lt. Nazrin 31 Oct, 2023 @ 5:15am 
ah i see so apparently getviewmodel is a nil value which means getviewmodel is undefined/doesnt exist, weird
Lt. Nazrin 31 Oct, 2023 @ 5:24am 
dude literally all the devs need to do is define what getviewmodel is
Lt. Nazrin 31 Oct, 2023 @ 5:29am 
OH ♥♥♥♥ I ♥♥♥♥♥♥♥ FIXED IT HAHAHAHAHHA I FIXED ITTTTTTTTTTTTTTT
Spider_Phoenix045 31 Oct, 2023 @ 6:21am 
Nice!
Lt. Nazrin 31 Oct, 2023 @ 6:39am 
ehhh sorta, it no longer makes errors but at the cost of the muzzleflash and tracers not being aligned with the first person view of the gun, but im mainly using this addon for npc wars so its not too bad of a thing
Lt. Nazrin 31 Oct, 2023 @ 6:39am 
until the devs can fix this bug (probably never) ill have to get used to it :P
Wait To Make NPC Use Those Weapons
< >
Showing 1-15 of 25 comments
Per page: 1530 50