Effect error: Couldn't initialize effect!

Hey, when i’m trying to use one of my effects here, I get this:

Error: Couldn't initialize effect!

I can’t find the problem because the error is so damn undescriptive (if garry is reading this, please make this more descriptive).
My code is:
local effectdata = EffectData()

effectdata:SetEntity( self.Target )
effectdata:SetOrigin( self.Target:WorldToLocal( TargetPos ) )

local muzzlepos = self:GetPos() + self:GetForward() * 5
effectdata:SetAttachment( self:EntIndex() )
effectdata:SetStart( self:WorldToLocal( muzzlepos ) )

effectdata:SetScale( 2 )
effectdata:SetMagnitude( 4 )
effectdata:SetRadius( 4 )

util.Effect( “supahbeam”, effectdata )

Clientside code (this looks a little ugly, but bear with me):
local Ent = Entity( data:GetAttachment() )
local StartPos = data:GetStart()
local Target = data:GetEntity()
local AimPos = data:GetOrigin()
local Time = data:GetScale()
local SpriteSize = data:GetMagnitude() or 8
local BeamWidth = data:GetRadius() or 2

self.StartTime = CurTime()
self.EndTime = CurTime()
self.Duration = Time

self.Ent = Ent
self.Target = Target

self.AimPos = AimPos
self.StartPos = StartPos

self.SpriteSize = SpriteSize
self.SpritePos = Vector(0,0,0) --This will change later

self.BeamWidth = BeamWidth
self.OriginalModel = Ent:GetModel()

All help appreciated. No, I haven’t searched, searching is disabled :frowning:

So… where’s the effect code?

The clientside bit I posted. It fails when it initializes, not when it renders, so I don’t think (correct me if i’m wrong) there’s any point posting that.
I’ve thought maybe it’s the entity being invalid, but i’ve checked it and it’s fine.

I see, I’m guessing there’s an error somewhere in the effect code then, since it doesn’t seem to have been registered.

Yeah I think it was…

local EFFECT = {}
function EFFECT...

I copied the effect from my WIP toybox weapon.
This was leftover from my toybox code :downs: