Can anyone help me fix these broken Sweps/SNPCs

I’ve been working on sweps and SNPCs for my Star Wars model ports, but there’s a lot of bugs in the code.

I set up an SVN for testing and for frequent update reasons.
http://starwarsmodelssvn.googlecode.com/svn/trunk/

I can’t seem to fix the new swep holdtype thing that Garry added.
The swep view and world animations won’t play.
SNPCs that are supposed to be friendly, shoot me.
The droids and stormtroopers shoot each other.
and there’s some other console errors below.

This isn’t even all of it…


entities/npc_sgg_clonetrooper/init.lua:58: '}' expected near '"npc_sgg_clonecommando"'
Folder	=	entities/npc_sgg_clonetrooper
Couldn't register Scripted Entity npc_sgg_clonetrooper - the Type field is empty!
entities/npc_sgg_stormtrooper/init.lua:36: '=' expected near 'ENT'
Folder	=	entities/npc_sgg_stormtrooper
Couldn't register Scripted Entity npc_sgg_stormtrooper - the Type field is empty!

weapons/blaster_base/shared.lua:617: attempt to call method 'DrawViewModel' (a nil value)
includes/modules/draw.lua:75: bad argument #1 to 'GetTextSize' (string expected, got nil)
entities/npc_sgg_clonecommando/init.lua:251: attempt to call method 'SetClip1' (a nil value)
entities/npc_sgg_clonecommando/init.lua:256: attempt to call method 'SetClip1' (a nil value)
entities/npc_sgg_clonecommando/init.lua:249: attempt to call method 'AddEntityRelationship' (a nil value)

I really need some help with this, I’m not much of a Lua coder and trying to fix all of this is frustrating.
Any help on how to fix this would be greatly appreciated.