Attempt to call field 'Create' (a nil value) HELP

This is my code:



	self.flare = ents.Create("env_flare")
	self.flare:SetPos( self.Owner:GetShootPos() + self.Owner:EyeAngles():Forward() * 10)
	self.flare:SetAngles( self.Owner:EyeAngles() )
	self.flare:SetKeyValue( "scale", "10" )
	self.flare:Spawn()
	self.flare:Activate()
	self.flare:Fire( "Launch", "3000", 0 )
	self.flare:Fire("Die", "7", 0)


and error:
[ERROR] addons/airboat gun swep/lua/weapons/swep_airboatgun_v3.lua:217: attempt to call field ‘Create’ (a nil value)

  1. unknown - addons/airboat gun swep/lua/weapons/swep_airboatgun_v3.lua:217

Wrap that code in “if SERVER” check, SWEP’s Primary/SecondaryAttack is shared.

thank you, it’s work

Mark as solved, then?

oh yeah