[LUA]
[ERROR] addons/ekc/lua/entities/ekc_attached/init.lua:52: Tried to use a NULL entity!
1. GetNWEntity - [C]:-1
2. unknown - addons/ekc/lua/entities/ekc_attached/init.lua:52
3. unknown - addons/ekc/lua/autorun/server/sv_ekc.lua:8
[/LUA]
I just updated several days ago, which broke a few of my scripts - this is the last issue I'm having. Help is appreciated !!
Here are the line(s)
init.lua
[LUA]
function ENT:Detach()
local cracker = self:GetNWEntity("cracker")
local keypad = cracker:GetNWEntity("cracking")
-- If keypad is still around, clean up variables we've set on it
if IsValid(keypad) then
keypad:RemoveCallOnRemove("ekc.cracker.attached.OnRemove")
keypad:SetNWEntity("cracker", NULL)
end
[/LUA]
Entity is set to
[LUA]
self.Entity:SetModel( "models/weapons/w_c4.mdl" )
[/LUA]
Make sure cracker is valid
I'm able to spawn it with the toolgun as well as use it, when I place the cracker on an object it cracks - and when it opens the door it remains on the keypad and continues cracking even though it's completed. It is supposed to return to the user as soon as its finished but it remains on the keypad and continues to crack until I remove it.
If I remove the keypad the cracker then does what its supposed to do - and falls to the ground.
I'm saying make sure cracker in the code is valid
code is untouched this issue just occured after the latest update I did notice this in the first few lines :
[LUA]
ENT.cracker_config = {}
ENT.cracker_weapon_class = ""
function ENT:Initialize()
self.Entity:SetModel( "models/weapons/w_c4.mdl" )
self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
self.Entity:SetSolid( SOLID_VPHYSICS )
self.Entity:SetUseType( SIMPLE_USE )
self.Entity:SetCollisionGroup( COLLISION_GROUP_WEAPON )
self.attached_to_keypad = NULL
local phys = self.Entity:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
end
[/LUA]
not sure if thats any help
anywhere else in the script its referred to as ekc_cracker
should I replace "cracker" with "ekc_cracker" ?
BTW :: This is Dellkans keypad cracker if you have any experience with it, it's hard to get into contact with dellkan anymore!
Is this a paid addon, or can you give me the full code without leaking?
[QUOTE=code_gs;47903441]Is this a paid addon, or can you give me the full code without leaking?[/QUOTE]
Fairly sure this is a gm12 addon
code it's a paid addon.
I've used this script for a year now with no issues.
I'd be happy to PM you with some information that you'd need if you'd be nice enough to help me fix this, I wouldn't consider it leaking the code in the sense it's for purposes to fix the script, I haven't seen this active on many servers (I know of 1 other server that uses it) which if I'm having the issue, everyone must be - again I haven't touched this script. It'd be great if we could get it working again, a phenomenal cracker for a good RP experience!
Sorry, you need to Log In to post a reply to this thread.