Lua swep not showing up in category

Can sombody tell me why my swep isn’t showing up in category’s?

Here’s the file location:

C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons\deagle\lua\weapons\deagle\weapon_deagle.lua

Here’s the code:


SWEP.PrintName			= "Deagle"
SWEP.Author				= "Blazertron"
SWEP.Category			= "CS: S Ports"

SWEP.Spawnable			= true
SWEP.AdminSpawnable		= true

SWEP.Primary.ClipSize			= 10
SWEP.Primary.DefaultClip		= 10

SWEP.Secondary.ClipSize			= -1
SWEP.Secondary.DefaultClip		= -1
SWEP.Secondary.Ammo				= "none"

SWEP.ViewModel		= "models\weapons\deagle\v_pist_deagle.mdl"
SWEP.WorldModel		= "models\weapons\deagle\w_pist_deagle.mdl"

The same thing happens with the m9k base, it just doesn’t show up in categories, sorry if i’m being stupid, i’m new to this

EDIT: I just noticed it looks like there is a space where it says ‘addons’, thats not actually there, it must be a graphical glitch or something

have you tried adding
[lua]AddCSLuaFile()[/lua]
to the very top of your script?

No it didn’t do anything :frowning:

Move the file to the weapons folder: only use the folder when you’re splitting it into shared, init, and cl_init

Seriously, thanks man, that’s cleared up a lot of stuff! I wouldn’t have figured it out if it wasn’t for you :slight_smile: