Multiple problems [Probably easy to medium.]

Edit: For some reason, this entity is colliding before it looks like it’s hit its target.

In the picture it shows where the fire ball disappears, and the point it’s collided with, as well as the last particles it emitted on its journey.

http://troll.ws/i/f8RYTu.png

weapon_spell_fireball.lua: http://lua.nopaste.dk/p13991
ent_spell_base.lua: http://lua.nopaste.dk/p13990

Also if you read the comments, you’d notice that I also have problems associating effects with my entity.


	-- Doesn't work?
	--
	local fx = EffectData();
		fx:SetOrigin(self.Entity:GetPos());
		fx:SetEntity(self.Entity);
	util.Effect(self:GetNWString("ProjectileEffect"), fx); --self:GetProjectileEffect(), fx);
	--

The projectile effect I’m trying to attach to this entity is “fire”, and this is the source: http://lua.nopaste.dk/p13992

Also:


function ENT:SetupDataTables()
	--[[
		For some reason the NetworkVar's get fucked up..
		
		I had problems with all the strings being set to ProjectileEffect,
		and all sorts of random shit going on.
	]]--
	--[[self:NetworkVar( "String", "", "CollideSound" );
	self:NetworkVar( "String", "", "CollideEffect" );
	self:NetworkVar( "String", "", "CastSound" );
	self:NetworkVar( "String", "", "CastEffect" );
	self:NetworkVar( "String", "", "ProjectileEffect" );
	self:NetworkVar( "Int", 1, "Size" );
	self:NetworkVar( "Float", 500, "Speed" );]]--

	-- Works:
	self:SetNWString( "CollideSound", "" );
	self:SetNWString( "CollideEffect", "" );
	self:SetNWString( "CastSound", "" );
	self:SetNWString( "CastEffect", "" );
	self:SetNWString( "ProjectileEffect", "" );
	self:SetNWInt( "Size", 1 );
	self:SetNWInt( "Speed", 500 );
end