Weapon won't show up in menus

This is my first thread, so I guess I’ll give it a shot…

I own a DarkRP server and I wanted to take a weapon from the Homicide gamemode. I did (with the creator’s permission), and for a while it worked on my server. The problem is, now the weapon doesn’t spawn from the buy menu on my server and it doesn’t show up on the Q menu. I don’t remember changing anything, so I’m not sure what’s going on.

Here’s an error from the console:


[Batrachotoxin Needle] lua/weapons/wep_jack_hmcd_poisonneedle.lua:150: ')' expected near ':'
  1. unknown - lua/weapons/wep_jack_hmcd_poisonneedle.lua:0

I checked said lua file and went to line 150. Here’s the line there:


				function SWEP:DrawWorldModel()

Which is part of this block of code:


if(CLIENT)then
	function SWEP:GetViewModelPosition(pos,ang)
		if not(self.DownAmt)then self.DownAmt=8 end
		if(self.Owner:KeyDown(IN_SPEED))then
			self.DownAmt=math.Clamp(self.DownAmt+.1,0,8)
		else
			self.DownAmt=math.Clamp(self.DownAmt-.1,0,8)
		end
		local NewPos=pos+ang:Forward()*30-ang:Up()*(12+self.DownAmt)+ang:Right()*10
		return NewPos,ang
	end
	function SWEP:DrawWorldModel()
		local Pos,Ang=self.Owner:GetBonePosition(self.Owner:LookupBone("ValveBiped.Bip01_R_Hand"))
		if(self.DatWorldModel)then
			if((Pos)and(Ang)and 
				function SWEP:DrawWorldModel()
     self:DrawModel()
end				//(GAMEMODE:ShouldDrawWeaponWorldModel(self)))then
				self.DatWorldModel:SetRenderOrigin(Pos+Ang:Forward()*6-Ang:Up()*2+Ang:Right()*1)
				Ang:RotateAroundAxis(Ang:Right(),-30)
				self.DatWorldModel:SetRenderAngles(Ang)
				self.DatWorldModel:DrawModel()
			end
		else
			self.DatWorldModel=ClientsideModel("models/weapons/w_models/w_jyringe_proj.mdl")
			self.DatWorldModel:SetPos(self:GetPos())
			self.DatWorldModel:SetParent(self)
			self.DatWorldModel:SetNoDraw(false)
			self.DatWorldModel:SetModelScale(.5,0)
		end
	end
	function SWEP:ViewModelDrawn()
		--
	end
end

If more info is needed I can supply it.

Why are you calling ‘function SWEP:DrawWorldModel()’ inside ‘SWEP:DrawWorldModel()’ ?
Also you’re using an if statement (line 149) and never complete it with a then statement, but instead call a function inside of another function

So what am I supposed to change here?


I literally told you in my last post.
Don’t call a function inside of itself, and complete your “if” statement