I am having some issues with mad cows weapons. It randomly drops players with "Too many lua errors" here is some info.
The rcon when players are dropped
[CODE][ERROR] addons/mad cows weapons updated!!/lua/weapons/weapon_mad_base/shared.lua
:719: Tried to use a NULL entity!
1. __index - [C]:-1
2. unknown - addons/mad cows weapons updated!!/lua/weapons/weapon_mad_base/sh
ared.lua:719[/CODE]
The file it refers too
[CODE]
local Sound = Sound
local Vector = Vector
local CreateConVar = CreateConVar
local CurTime = CurTime
local IsFirstTimePredicted = IsFirstTimePredicted
local Angle = Angle
local EffectData = EffectData
local SinglePlayer = SinglePlayer
local FrameTime = FrameTime
local IsValid = IsValid
local WorldSound = WorldSound
local util = util
local hook = hook
local math = math
local timer = timer
local ents = ents
local ACT_VM_IDLE = ACT_VM_IDLE
local PLAYERANIMEVENT_CUSTOM_GESTURE = PLAYERANIMEVENT_CUSTOM_GESTURE
local GESTURE_SLOT_ATTACK_AND_RELOAD = GESTURE_SLOT_ATTACK_AND_RELOAD
local ACT_MP_ATTACK_CROUCH_PRIMARYFIRE = ACT_MP_ATTACK_CROUCH_PRIMARYFIRE
local ACT_MP_ATTACK_STAND_PRIMARYFIRE = ACT_MP_ATTACK_STAND_PRIMARYFIRE
local FCVAR_REPLICATED = FCVAR_REPLICATED
local FCVAR_ARCHIVE = FCVAR_ARCHIVE
local ACT_VM_DRAW_EMPTY = ACT_VM_DRAW_EMPTY
local ACT_VM_DRAW_SILENCED = ACT_VM_DRAW_SILENCED
local ACT_VM_DRAW = ACT_VM_DRAW
local IN_SPEED = IN_SPEED
local ACT_VM_IDLE_SILENCED = ACT_VM_IDLE_SILENCED
local ACT_VM_IDLE_EMPTY = ACT_VM_IDLE_EMPTY
local IN_FORWARD = IN_FORWARD
local IN_BACK = IN_BACK
local IN_MOVELEFT = IN_MOVELEFT
local IN_MOVERIGHT = IN_MOVERIGHT
local HUD_PRINTTALK = HUD_PRINTTALK
local ACT_VM_RELOAD = ACT_VM_RELOAD
local ACT_VM_RELOAD_SILENCED = ACT_VM_RELOAD_SILENCED
local ACT_VM_RELOAD_EMPTY = ACT_VM_RELOAD_EMPTY
local IN_USE = IN_USE
local ACT_INVALID = ACT_INVALID
local IN_DUCK = IN_DUCK
local SERVER = SERVER
local CLIENT = CLIENT
local MAT_GLASS = MAT_GLASS
local MAT_SAND = MAT_SAND
local MAT_FLESH = MAT_FLESH
local MAT_ALIENFLESH = MAT_ALIENFLESH
local MAT_WOOD = MAT_WOOD
local MAT_CONCRETE = MAT_CONCRETE
local MAT_PLASTIC = MAT_PLASTIC
/*---------------------------------------------------------
------mmmm---mmmm-aaaaaaaa----ddddddddd---------------------------------------->
mmmmmmmmmmmm aaaaaaaaa dddddddddd Name: Mad Cows Weapons
mmm mmmm mmm aaa aaa ddd ddd Author: Worshipper
mmm mmm mmm aaaaaaaaaaa ddd ddd Project Start: October 23th, 2009
mmm mmm aaa aaa dddddddddd Version: 2.0
---mmm--------mmm-aaa-----aaa-ddddddddd---------------------------------------->
---------------------------------------------------------*/
// Variables that are used on both client and server
local RecoilMul = CreateConVar ("mad_recoilmul", "1", {FCVAR_REPLICATED, FCVAR_ARCHIVE})
local DamageMul = CreateConVar ("mad_damagemul", "1", {FCVAR_REPLICATED, FCVAR_ARCHIVE})
SWEP.Category = "Mad Cows Weapons"
SWEP.Author = "Worshipper"
SWEP.Contact = "Josephcadieux@hotmail.com"
// I have nothing to say here because I'm a prick
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.HoldType = "pistol"
SWEP.ViewModelFOV = 60
SWEP.ViewModelFlip = false
SWEP.ViewModel = "models/weapons/c_pistol.mdl"
SWEP.WorldModel = "models/weapons/w_pistol.mdl"
SWEP.AnimPrefix = "python"
SWEP.UseHands = true
SWEP.Spawnable = false
SWEP.AdminSpawnable = false
SWEP.Primary.Sound = Sound("Weapon_AK47.Single")
SWEP.Primary.Recoil = 10
SWEP.Primary.Damage = 10
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0
SWEP.Primary.Delay = 0
SWEP.Primary.ClipSize = 5 // Size of a clip
SWEP.Primary.DefaultClip = 5 // Default number of bullets in a clip
SWEP.Primary.Automatic = false // Automatic/Semi Auto
SWEP.Primary.Ammo = "pistol"
SWEP.Secondary.ClipSize = -1 // Size of a clip
SWEP.Secondary.DefaultClip = -1 // Default number of bullets in a clip
SWEP.Secondary.Automatic = false // Automatic/Semi Auto
SWEP.Secondary.Ammo = "none"
SWEP.ActionDelay = CurTime()
// I added this function because some weapons like the Day of Defeat weapons need 1.2 or 1.5 seconds to deploy
SWEP.DeployDelay = 1
SWEP.ShellEffect = "effect_mad_shell_pistol" // "effect_mad_shell_pistol" or "effect_mad_shell_rifle" or "effect_mad_shell_shotgun"
SWEP.ShellDelay = 0
// Is it a pistol, a rifle, a shotgun or a sniper? Choose only one of them or you'll fucked up everything. BITCH!
SWEP.Pistol = false
SWEP.Rifle = false
SWEP.Shotgun = false
SWEP.Sniper = false
SWEP.IronSightsPos = Vector (0, 0, 0)
SWEP.IronSightsAng = Vector (0, 0, 0)
SWEP.RunArmOffset = Vector (0, 0, 5.5)
SWEP.RunArmAngle = Vector (-35, -3, 0)
// Burst options
SWEP.Burst = false
SWEP.BurstShots = 3
SWEP.BurstDelay = 0.05
SWEP.BurstCounter = 0
SWEP.BurstTimer = 0
// Custom mode options (Do not put a burst mode and a custom mode at the same time, it will not work)
SWEP.Type = 1 // 1 = Automatic/Semi-Automatic mode, 2 = Suppressor mode, 3 = Burst fire mode
SWEP.Mode = false
SWEP.data = {}
SWEP.data.NormalMsg = "Switched to semi-automatic."
SWEP.data.ModeMsg = "Switched to automatic."
SWEP.data.Delay = 0.5 // You need to wait 0.5 second after you change the fire mode
SWEP.data.Cone = 1
SWEP.data.Damage = 1
SWEP.data.Recoil = 1
SWEP.data.Automatic = false
// Constant accuracy means that your crosshair will not change if you're running, shooting or walking
SWEP.ConstantAccuracy = false
// I don't think it's hard to understand this
SWEP.Penetration = true
SWEP.Ricochet = true
SWEP.MaxRicochet = 1
SWEP.Tracer = 0 // 0 = Normal Tracer, 1 = Ar2 Tracer, 2 = Airboat Gun Tracer, 3 = Normal Tracer + Sparks Impact
SWEP.IdleDelay = 0
SWEP.IdleApply = false
SWEP.AllowIdleAnimation = true
SWEP.AllowPlaybackRate = true
SWEP.BoltActionSniper = false // Use this value if you want to remove the scope view after you shoot
SWEP.ScopeAfterShoot = false // Do not try to change this value
SWEP.IronSightZoom = 1.5
SWEP.ScopeZooms = {10}
SWEP.ScopeScale = 0.4
SWEP.ShotgunReloading = false
SWEP.ShotgunFinish = 0.5
SWEP.ShotgunBeginReload = 0.3
/*---------------------------------------------------------
Name: SWEP:Initialize()
Desc: Called when the weapon is first loaded.
---------------------------------------------------------*/
function SWEP:Initialize()
self:SetWeaponHoldType(self.HoldType)
if (SERVER) then
// Fucking NPCs
self:SetNPCMinBurst(30)
self:SetNPCMaxBurst(30)
self:SetNPCFireRate(self.Primary.Delay)
end
end
/*---------------------------------------------------------
Name: SWEP:Precache()
Desc: Use this function to precache stuff.
---------------------------------------------------------*/
function SWEP:Precache()
util.PrecacheSound("weapons/clipempty_pistol.wav")
end
/*---------------------------------------------------------
Name: ENT:SetupDataTables()
Desc: Setup the data tables.
---------------------------------------------------------*/
function SWEP:SetupDataTables()
self:DTVar("Bool", 0, "Holsted")
self:DTVar("Bool", 1, "Ironsights")
self:DTVar("Bool", 2, "Scope")
self:DTVar("Bool", 3, "Mode")
end
/*---------------------------------------------------------
Name: SWEP:IdleAnimation()
Desc: Are you seriously too stupid to understand the function by yourself?
---------------------------------------------------------*/
function SWEP:IdleAnimation(time)
if not self.AllowIdleAnimation then return false end
self.IdleApply = true
self.ActionDelay = CurTime() + time
self.IdleDelay = CurTime() + time
end
/*---------------------------------------------------------
Name: SWEP:PrimaryAttack()
Desc: +attack1 has been pressed.
---------------------------------------------------------*/
function SWEP:PrimaryAttack()
// Holst/Deploy your fucking weapon
if (not self.Owner:IsNPC() and self.Owner:KeyDown(IN_USE)) then
bHol
Put this in your server.cfg
sv_kickerrornum 0
[QUOTE=Ice Tea;41487697]Put this in your server.cfg
sv_kickerrornum 0[/QUOTE]
While this will temporarily work, it'd be even better to actually fix the error.
This happens with the Fists swep too IIRC.
It happens when people die
Sorry, you need to Log In to post a reply to this thread.