I’m trying to give ammo on weapon spawn as ti doesn’t seem to work with the weapons I’m using. I have this in my SWEP but it errors.
function SWEP:Initialize() if SERVER then self.Owner:GiveAmmo(90,self.Primary.Ammo) end end
attempt to call method 'GiveAmmo' (a nil value)
Yet I can run on the server I’m on !l me:GiveAmmo(num,“ammotype”) and it works fine.
Any ideas why this isn’t working?