I made a SWEP and it dosent show

I made a TMP swep but it dosent show?? WHAT DO I DO its like this:

Addons\Silenced tmp\lua\weapons\weapon_tmpSilenced\shared.lua, but it still dosent show and here is the lua:

[lua]if( SERVER ) then
AddCSLuaFile( “shared.lua” );
end

if( CLIENT ) then
SWEP.PrintName = “Tmp2”;
SWEP.Slot = 3;
SWEP.SlotPos = 3;
SWEP.HoldType = “ar2”
SWEP.DrawCrosshair = true;
end

killicon.AddFont( "weapon_tmp", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ) )

end

SWEP.Base = “weapon_cs_base”
SWEP.ViewModelFlip = true
SWEP.Category = “Counter-Strike”

SWEP.Spawnable = false
SWEP.AdminSpawnable = true

SWEP.ViewModel = “models/weapons/v_smg_tmp.mdl” –
SWEP.WorldModel = “models/weapons/w_smg_tmp.mdl”

SWEP.Weight = 3
SWEP.AutoSwitchTo = true – If When You Spawn, It Automaticly Switches To It
SWEP.AutoSwitchFrom = true

SWEP.ForceApply = 3 –
SWEP.TracerFreq = 5 –

SWEP.Primary.Sound = Sound( “Weapon/tmp.Single” )
SWEP.Primary.Recoil = 0
SWEP.Primary.Damage = 2
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0 –
SWEP.Primary.ClipSize = 20
SWEP.Primary.Delay = 0.5 – SWEP.Primary.DefaultClip = 100 – SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = “smg”
WEP.IronSightsPos = Vector( 5.3, -3, 2.6 ) [/lua]

so what did i do wrong?

Any errors in the console?

Also, you should post the code in [noparse][lua][/lua][/noparse] tags.

Here is one
[lua]weapons/weapon_tmp2/shared.lua:19: ‘<eof>’ expected near ‘end’[/lua]

You have an unneeded end on line 17.

Why 17 that says 19 So then if i remove the line 17 will it work?

Remove the end at line 11.

Well if that was your whole file then yes, this is obviously causing an error.

[editline]09:01AM[/editline]

Do what MakeR said. :smile:

OK i removed it i will go look if it works

WEP.IronSightsPos = Vector( 5.3, -3, 2.6 )

This is another error, it should be SWEP of course.

OK now it says this [lua]weapons/weapon_tmp2/shared.lua:12: unfinished string near ‘"d’[/lua]

[lua]if( SERVER ) then
AddCSLuaFile( “shared.lua” );
end

if( CLIENT ) then
SWEP.PrintName = “Tmp2”
SWEP.Slot = 3
SWEP.SlotPos = 3
SWEP.HoldType = “ar2”
SWEP.DrawCrosshair = true
SWEP.Author = “SPYNeox”
SWEP.IconLetter = "d

SWEP.Base = “weapon_cs_base” – The Base File, Dont Touch This
SWEP.ViewModelFlip = true – Which Side The Gun Is On, When Testing, Change If Necessary
SWEP.Category = “SPYNeox”

SWEP.Spawnable = false – Weather Everybody Can Spawn The Swep
SWEP.AdminSpawnable = true – If ADMIN Can Spawn, <note> if you want a admin only, set {SWEP.Spawnable}
– to false, and admin to true

SWEP.ViewModel = “models/weapons/v_smg_tmp.mdl” – what it looks like <refer to model names> READ THE NOTE AT THE TOP IT
SWEP.WorldModel = “models/weapons/w_smg_tmp.mdl” – what it looks like <refer to model names> READ THE NOTE AT THE TOP IT

SWEP.Weight = 3 – No Need To Change
SWEP.AutoSwitchTo = true – If When You Spawn, It Automaticly Switches To It
SWEP.AutoSwitchFrom = true – Dont Know, Opposite Mayby

SWEP.ForceApply = 3 – Amount of force to give to phys objects
SWEP.TracerFreq = 5 – Show a tracer on every x bullets

SWEP.Primary.Sound = Sound( “Weapon_tmp.Single” ) – Sound Of The Swep <refer to model names>
SWEP.Primary.Recoil = 0 – Recoil, How Much It Pushes Back
SWEP.Primary.Damage = 2 – Damage Of Each Shot
SWEP.Primary.NumShots = 1 – How Many Bullets Come Out Of The Gun At Once, A Shotgun Is 5 Where A Normal Gun Is 1
SWEP.Primary.Cone = 0 – Spread, A Shotgun Is 0.1, A Normal Gun Is Around 0.03
SWEP.Primary.ClipSize = 20 – How Many Bullets In A Clip
SWEP.Primary.Delay = 0.5 – Time Inbetween Each Bullet(s), In Seconds
SWEP.Primary.DefaultClip = 100 – Ammo You Got Left
SWEP.Primary.Automatic = true – Auto Or Not
SWEP.Primary.Ammo = “smg” – Type Of Ammo,No Need To Change

SWEP.IronSightsPos = Vector( 5.3, -3, 2.6 )[/lua]

You need to finish the string on line 12. Like this: “d”

I did now it says [lua]weapons/weapon_tmp2/shared.lua:45: ‘end’ expected (to close ‘if’ at line 5) near ‘<eof>’[/lua]

You removed both of the ends when you were only supposed to remove one of them, add an end on line 13.

[editline]01:24PM[/editline]

I recommend you read up on the syntax of Lua before you start coding in it. I suggest reading the Lua 5.1 Reference Manual and PIL

where do i get that? at gmod wiki? ANYway the swep works now THANKS ALOT!!!

Click the links.

[editline]01:41PM[/editline]

And no problem :smile: