I dont know if this is the right place but i couldn't find any other.
So here is it.
I have a problem in my swep. When i try to fire my custom made swep it dont fire. It just takes 1 ammo and gives me an error in the console
[ERROR] lua/weapons/weapon_custommadeswep.lua:68: Tried to use a NULL entity!
1. SetPos - [C]:-1
2. unknown - lua/weapons/weapon_custommadeswep.lua:6
Heres is line 67-68.
local ent = ents.Create("ent_ghostgrenade")
ent:SetPos(owner:EyePos() + (owner:GetAimVector() * 16))
What its supposed to fire is the ent_ghostgrenade.
I have even trying to use ent_create ent_ghostgrenade but it says it dont exist.
So the problem i think is that ent_ghostgrenade dosn't exist.
Do someone know how to fix this?
[lua] if ent:IsValid() then[/lua]
The entity "ent_ghostgrenade" doesn't exist, means you must code it first before you can use it.
ok.
Sorry, you need to Log In to post a reply to this thread.