Paintball SWEP

Hello all,
ive been making a paintball gamemode recently but when i shoot i get this error
[LUA]
[ERROR] gamemodes/paintball/entities/weapons/paintball_swep/shared.lua:90: attempt to call field ‘Create’ (a nil value)

  1. unknown - gamemodes/paintball/entities/weapons/paintball_swep/shared.lua:90
    [/LUA]
    but it still fires the paint ball and if i remove that line it doesnt
    [LUA]
    local pb = ents.Create(“paint_ball”) --<-- line 90

local shotpos = self.Owner:GetShootPos()
shotpos = shotpos + self.Owner:GetForward() * 5
shotpos = shotpos + self.Owner:GetRight() * 9
shotpos = shotpos + self.Owner:GetUp() * -0.5

pb:SetPos(shotpos)
pb:SetAngles(self.Owner:EyeAngles())
pb:SetOwner(self.Owner)
pb:Spawn()
[/LUA]

The file is supposed to be in init.lua, not shared…

It could go in shared if you use if SERVER --code-- end

But that’s the thing, I don’t know if he’s using if SERVER end

Thanks that worked