Mad Cows C4 Lua Error

Trying to fix up Mad Cows cause I prefer it over CSS Realistic and I can’t find one on Workshop.


        SWEP.Ghost                 = NULL

if not self.Ghost:IsValid() then

        self.Ghost = ents.Create( "prop_physics" )


The error I get when I equip the C4 is
[ERROR] addons/mad cows weapons/lua/weapons/weapon_mad_c4/cl_init.lua:23: attempt to call field ‘Create’ (a nil value)

I’m not sure how to correct this error.

Which version are you using?

Because that one works, and I have found no problems.

P.s. Just looked, yours is an old version.

[editline]15th February 2013[/editline]

Incase you still need the code though:

if self.Owner ~= LocalPlayer() then return end
if SERVER then
if not self.Ghost:IsValid( ) then
// self.Ghost = ents.Create(“prop_physics”)
// self.Ghost:SetModel(“models/weapons/w_c4_planted.mdl”)
// self.Ghost:SetOwner(self.Owner)

I must be blind then. Thanks for the link, and the code. Looks like I’ve been doing this for nothing.

Yeah, I feel your pain, I did the same thing with evolve :stuck_out_tongue: