Paintball SWEP

Hello all,
ive been making a paintball gamemode recently but when i shoot i get this error
[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
    but it still fires the paint ball and if i remove that line it doesnt
    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


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