can't find factory for entity error

In autorun [lua]
local function InitPostEntity( )

local pos = Vector( 0, 0, 0 ); -- map origin
local ent = ents.Create( "Event_Creator" );
ent:SetPos( pos );
ent:Spawn();
    ent:Initialize();
    ent:Activate();
    ent:DropToFloor();

end
hook.Add( “InitPostEntity”, “SpawnOnMapStart”, InitPostEntity );[/lua]

My entity

[lua]AddCSLuaFile( “cl_init.lua” ) – Make sure clientside
AddCSLuaFile( “shared.lua” ) --and shared scripts are sent.
include(‘shared.lua’)

function ENT:Initialize()
self.Entity:SetModel( “models/props_lab/jar01a.mdl” )
self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entity:SetMoveType( MOVETYPE_NONE )
self.Entity:SetSolid( SOLID_VPHYSICS )
self.Entity:SetColor( 255,255,255 )

local phys = self.Entity:GetPhysicsObject()
if (phys:IsValid()) then
    phys:Wake()	
end

self:TimerLaunch()
end

function ENT:TimerLaunch()
timer.Create(“Timer1”, 3600, 0, EventLaunch)
end

Event = {}

function EventLaunch()
table.Random(Event)()
end

function Event.Melonrain()
print(“Pluie de Melon”)
for i = 1,10 do
local a = (math.random(-5000,5000))
local b = (math.random(-5000,5000))
local c = (math.random(5000,6000))
local pos = Vector(a, b, c)
if util.IsInWorld(pos) then

local Air = ents.Create(“Prop_Physics”)
Air:SetModel( “models/props_junk/watermelon01.mdl”)
Air:SetPos(pos)
Air:Spawn()
Air:Activate()
end
end
end

function Event.Meteorain()
print(“Meteor_rain”)
for i = 1,20 do
local a = (math.random(-5000,5000))
local b = (math.random(-5000,5000))
local c = (math.random(5000,6500))
local pos = Vector(a, b, c)
if util.IsInWorld(pos) then

local Met = ents.Create(“Meteorite”)
Met:SetPos(pos)
Met:Spawn()
Met:Activate()
end
end
end

function Event.Bigmeteor()
print(“BigMeteorStrike”)
for i = 1,10 do
local a = (math.random(-5000,5000))
local b = (math.random(-5000,5000))
local c = (math.random(5000,6500))
local pos = Vector(a, b, c)
if util.IsInWorld(pos) then

local M = ents.Create(“BigMeteor”)
M:SetPos(pos)
M:Spawn()
M:Activate()
end
end
end

function Event.EarthQuake()
print(“EarthQuake”)
local a = (math.random(-5000,5000))
local b = (math.random(-5000,5000))

local Quake = ents.Create(“earthquakesent”)
Quake:SetPos(Vector(a, b, 10))
Quake:Spawn()
Quake:Activate()
end

function Event.Freeze()
print(“Bombardement1”)
for i = 1,10 do
local a = (math.random(-5000,5000))
local b = (math.random(-5000,5000))
local c = (math.random(5000,6000))
local pos = Vector(a, b, c)
if util.IsInWorld(pos) then

local nade = ents.Create(“freezenade”)
nade:SetPos(pos)
nade:Spawn()
nade:Activate()
end
end
end

function Event.Unwelding()
print(“Bombardement2”)
for i = 1,10 do
local a = (math.random(-5000,5000))
local b = (math.random(-5000,5000))
local c = (math.random(5000,6000))
local pos = Vector(a, b, c)
if util.IsInWorld(pos) then

local nade = ents.Create(“antiweldnade”)
nade:SetPos(pos)
nade:Spawn()
nade:Activate()
end
end
end

function Event.Toxic()
print(“Toxic_Bombardement”)
for i = 1,10 do
local a = (math.random(-5000,5000))
local b = (math.random(-5000,5000))
local c = (math.random(5000,6000))
local pos = Vector(a, b, c)
if util.IsInWorld(pos) then

local nade = ents.Create(“ToxicBomb”)
nade:SetPos(pos)
nade:Spawn()
nade:Activate()
end
end
end

function Event.Missile()
print(“Tracking_Missile”)
for i = 1,5 do
local a = (math.random(-50,50))
local b = (math.random(-20,20))
local c = (math.random(5000,6400))
local pos = Vector(a, b, c)
if util.IsInWorld(pos) then

local nade = ents.Create(“amraam_tracker”)
nade:SetPos(pos)
nade:Spawn()
nade:Activate()
end
end
end

function ENT:Think()
end [/lua]

in shared
[lua]
ENT.Type = “anim”
ENT.Base = “base_gmodentity”
ENT.PrintName = “Event_Creator”
ENT.Author = “Sillirion”
ENT.Contact = “”
ENT.Purpose = “Making the server funny”
ENT.Instructions = “”

ENT.Spawnable = false
ENT.AdminSpawnable = false
[/lua]

Give me this error:
[lua]Can’t find factory for entity: Event_Creator
Hook ‘SpawnOnMapStart’ Failed: autorun/Event_SpawnScript.lua:5: Tried to use a NULL entity![/lua]

Anyone could explain me why?

I suspect your entity is called event_creator not Event_Creator. Capitalisation is important.

No, my entity is correctly named

I’m having the same problem. What would cause a factory error?

move it to autorun/server. If it’s in autorun, the client tries to make it as well as the server and can’t for whatever reason.

Yes,it was that… lol Thank you